|
10 | 10 | (global $~lib/shared/runtime/Runtime.Minimal i32 (i32.const 1))
|
11 | 11 | (global $~lib/shared/runtime/Runtime.Incremental i32 (i32.const 2))
|
12 | 12 | (global $~lib/native/ASC_SHRINK_LEVEL i32 (i32.const 0))
|
| 13 | + (global $~argumentsLength (mut i32) (i32.const 0)) |
13 | 14 | (global $~lib/memory/__data_end i32 (i32.const 284))
|
14 | 15 | (global $~lib/memory/__stack_pointer (mut i32) (i32.const 33052))
|
15 | 16 | (global $~lib/memory/__heap_base i32 (i32.const 33052))
|
|
26 | 27 | (export "stringArrayMethodCall" (func $export:std/array-access/stringArrayMethodCall))
|
27 | 28 | (export "stringArrayArrayPropertyAccess" (func $export:std/array-access/stringArrayArrayPropertyAccess))
|
28 | 29 | (export "stringArrayArrayMethodCall" (func $export:std/array-access/stringArrayArrayMethodCall))
|
| 30 | + (export "functionArrayElementCall" (func $export:std/array-access/functionArrayElementCall)) |
29 | 31 | (func $~lib/array/Array<i32>#__get (type $i32_i32_=>_i32) (param $this i32) (param $index i32) (result i32)
|
30 | 32 | (local $value i32)
|
31 | 33 | local.get $index
|
|
213 | 215 | call $~lib/util/string/compareImpl
|
214 | 216 | i32.eqz
|
215 | 217 | )
|
| 218 | + (func $std/array-access/functionArrayElementCall (type $i32_=>_i32) (param $a i32) (result i32) |
| 219 | + i32.const 123 |
| 220 | + i32.const 1 |
| 221 | + global.set $~argumentsLength |
| 222 | + local.get $a |
| 223 | + i32.const 0 |
| 224 | + call $~lib/array/Array<%28i32%29=>i32>#__get |
| 225 | + i32.load $0 |
| 226 | + call_indirect $0 (type $i32_=>_i32) |
| 227 | + ) |
216 | 228 | (func $~stack_check (type $none_=>_none)
|
217 | 229 | global.get $~lib/memory/__stack_pointer
|
218 | 230 | global.get $~lib/memory/__data_end
|
|
556 | 568 | global.set $~lib/memory/__stack_pointer
|
557 | 569 | local.get $3
|
558 | 570 | )
|
| 571 | + (func $~lib/array/Array<%28i32%29=>i32>#__get (type $i32_i32_=>_i32) (param $this i32) (param $index i32) (result i32) |
| 572 | + (local $value i32) |
| 573 | + (local $3 i32) |
| 574 | + global.get $~lib/memory/__stack_pointer |
| 575 | + i32.const 4 |
| 576 | + i32.sub |
| 577 | + global.set $~lib/memory/__stack_pointer |
| 578 | + call $~stack_check |
| 579 | + global.get $~lib/memory/__stack_pointer |
| 580 | + i32.const 0 |
| 581 | + i32.store $0 |
| 582 | + local.get $index |
| 583 | + local.get $this |
| 584 | + i32.load $0 offset=12 |
| 585 | + i32.ge_u |
| 586 | + if |
| 587 | + i32.const 32 |
| 588 | + i32.const 96 |
| 589 | + i32.const 114 |
| 590 | + i32.const 42 |
| 591 | + call $~lib/builtins/abort |
| 592 | + unreachable |
| 593 | + end |
| 594 | + global.get $~lib/memory/__stack_pointer |
| 595 | + local.get $this |
| 596 | + i32.load $0 offset=4 |
| 597 | + local.get $index |
| 598 | + i32.const 2 |
| 599 | + i32.shl |
| 600 | + i32.add |
| 601 | + i32.load $0 |
| 602 | + local.tee $value |
| 603 | + i32.store $0 |
| 604 | + i32.const 1 |
| 605 | + drop |
| 606 | + i32.const 0 |
| 607 | + i32.eqz |
| 608 | + drop |
| 609 | + local.get $value |
| 610 | + i32.eqz |
| 611 | + if |
| 612 | + i32.const 144 |
| 613 | + i32.const 96 |
| 614 | + i32.const 118 |
| 615 | + i32.const 40 |
| 616 | + call $~lib/builtins/abort |
| 617 | + unreachable |
| 618 | + end |
| 619 | + local.get $value |
| 620 | + local.set $3 |
| 621 | + global.get $~lib/memory/__stack_pointer |
| 622 | + i32.const 4 |
| 623 | + i32.add |
| 624 | + global.set $~lib/memory/__stack_pointer |
| 625 | + local.get $3 |
| 626 | + ) |
559 | 627 | (func $export:std/array-access/i32ArrayArrayElementAccess (type $i32_=>_i32) (param $0 i32) (result i32)
|
560 | 628 | (local $1 i32)
|
561 | 629 | global.get $~lib/memory/__stack_pointer
|
|
651 | 719 | global.set $~lib/memory/__stack_pointer
|
652 | 720 | local.get $1
|
653 | 721 | )
|
| 722 | + (func $export:std/array-access/functionArrayElementCall (type $i32_=>_i32) (param $0 i32) (result i32) |
| 723 | + (local $1 i32) |
| 724 | + global.get $~lib/memory/__stack_pointer |
| 725 | + i32.const 4 |
| 726 | + i32.sub |
| 727 | + global.set $~lib/memory/__stack_pointer |
| 728 | + call $~stack_check |
| 729 | + global.get $~lib/memory/__stack_pointer |
| 730 | + local.get $0 |
| 731 | + i32.store $0 |
| 732 | + local.get $0 |
| 733 | + call $std/array-access/functionArrayElementCall |
| 734 | + local.set $1 |
| 735 | + global.get $~lib/memory/__stack_pointer |
| 736 | + i32.const 4 |
| 737 | + i32.add |
| 738 | + global.set $~lib/memory/__stack_pointer |
| 739 | + local.get $1 |
| 740 | + ) |
654 | 741 | )
|
0 commit comments