Commit 3b18b02
committed
[[ UnsafeAttrib ]] Add unsafe handlers and unsafe blocks
This patch adds the idea of unsafe handlers and unsafe blocks
to LCB.
An unsafe handler can be declared by using the 'unsafe' keyword:
unsafe handler Foo()
end handler
An unsafe statement block can be written as:
unsafe
... do unsafe things ...
end unsafe
Calls to unsafe handlers, foreign handlers and usage of bytecode
blocks can only occur within either an unsafe handler, or unsafe
block.1 parent 0177099 commit 3b18b02
28 files changed
Lines changed: 715 additions & 245 deletions
File tree
- docs
- guides
- lcb/notes
- engine/src
- extensions/widgets
- browser
- treeview
- libfoundation/include
- libscript
- include/libscript
- src
- tests
- lcb
- compiler
- frontend
- stdlib
- vm
- toolchain/lc-compile/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
| 337 | + | |
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
386 | 390 | | |
387 | 391 | | |
388 | 392 | | |
| |||
476 | 480 | | |
477 | 481 | | |
478 | 482 | | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
479 | 487 | | |
480 | 488 | | |
481 | 489 | | |
| |||
529 | 537 | | |
530 | 538 | | |
531 | 539 | | |
| 540 | + | |
532 | 541 | | |
533 | 542 | | |
534 | 543 | | |
| |||
760 | 769 | | |
761 | 770 | | |
762 | 771 | | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
763 | 775 | | |
764 | 776 | | |
765 | 777 | | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
766 | 791 | | |
767 | 792 | | |
768 | 793 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments