|
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 16668))
|
15 | 16 | (global $~lib/memory/__heap_base i32 (i32.const 16668))
|
|
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 (param $this i32) (param $index i32) (result i32)
|
30 | 32 | (local $value i32)
|
31 | 33 | local.get $index
|
|
210 | 212 | call $~lib/util/string/compareImpl
|
211 | 213 | i32.eqz
|
212 | 214 | )
|
| 215 | + (func $std/array-access/functionArrayElementCall (param $a i32) (result i32) |
| 216 | + i32.const 123 |
| 217 | + i32.const 1 |
| 218 | + global.set $~argumentsLength |
| 219 | + local.get $a |
| 220 | + i32.const 0 |
| 221 | + call $~lib/array/Array<%28i32%29=>i32>#__get |
| 222 | + i32.load $0 |
| 223 | + call_indirect $0 (type $i32_=>_i32) |
| 224 | + ) |
213 | 225 | (func $~stack_check
|
214 | 226 | global.get $~lib/memory/__stack_pointer
|
215 | 227 | global.get $~lib/memory/__data_end
|
|
553 | 565 | global.set $~lib/memory/__stack_pointer
|
554 | 566 | local.get $3
|
555 | 567 | )
|
| 568 | + (func $~lib/array/Array<%28i32%29=>i32>#__get (param $this i32) (param $index i32) (result i32) |
| 569 | + (local $value i32) |
| 570 | + (local $3 i32) |
| 571 | + global.get $~lib/memory/__stack_pointer |
| 572 | + i32.const 4 |
| 573 | + i32.sub |
| 574 | + global.set $~lib/memory/__stack_pointer |
| 575 | + call $~stack_check |
| 576 | + global.get $~lib/memory/__stack_pointer |
| 577 | + i32.const 0 |
| 578 | + i32.store $0 |
| 579 | + local.get $index |
| 580 | + local.get $this |
| 581 | + i32.load $0 offset=12 |
| 582 | + i32.ge_u |
| 583 | + if |
| 584 | + i32.const 32 |
| 585 | + i32.const 96 |
| 586 | + i32.const 114 |
| 587 | + i32.const 42 |
| 588 | + call $~lib/builtins/abort |
| 589 | + unreachable |
| 590 | + end |
| 591 | + global.get $~lib/memory/__stack_pointer |
| 592 | + local.get $this |
| 593 | + i32.load $0 offset=4 |
| 594 | + local.get $index |
| 595 | + i32.const 2 |
| 596 | + i32.shl |
| 597 | + i32.add |
| 598 | + i32.load $0 |
| 599 | + local.tee $value |
| 600 | + i32.store $0 |
| 601 | + i32.const 1 |
| 602 | + drop |
| 603 | + i32.const 0 |
| 604 | + i32.eqz |
| 605 | + drop |
| 606 | + local.get $value |
| 607 | + i32.eqz |
| 608 | + if |
| 609 | + i32.const 144 |
| 610 | + i32.const 96 |
| 611 | + i32.const 118 |
| 612 | + i32.const 40 |
| 613 | + call $~lib/builtins/abort |
| 614 | + unreachable |
| 615 | + end |
| 616 | + local.get $value |
| 617 | + local.set $3 |
| 618 | + global.get $~lib/memory/__stack_pointer |
| 619 | + i32.const 4 |
| 620 | + i32.add |
| 621 | + global.set $~lib/memory/__stack_pointer |
| 622 | + local.get $3 |
| 623 | + ) |
556 | 624 | (func $export:std/array-access/i32ArrayArrayElementAccess (param $0 i32) (result i32)
|
557 | 625 | (local $1 i32)
|
558 | 626 | global.get $~lib/memory/__stack_pointer
|
|
648 | 716 | global.set $~lib/memory/__stack_pointer
|
649 | 717 | local.get $1
|
650 | 718 | )
|
| 719 | + (func $export:std/array-access/functionArrayElementCall (param $0 i32) (result i32) |
| 720 | + (local $1 i32) |
| 721 | + global.get $~lib/memory/__stack_pointer |
| 722 | + i32.const 4 |
| 723 | + i32.sub |
| 724 | + global.set $~lib/memory/__stack_pointer |
| 725 | + call $~stack_check |
| 726 | + global.get $~lib/memory/__stack_pointer |
| 727 | + local.get $0 |
| 728 | + i32.store $0 |
| 729 | + local.get $0 |
| 730 | + call $std/array-access/functionArrayElementCall |
| 731 | + local.set $1 |
| 732 | + global.get $~lib/memory/__stack_pointer |
| 733 | + i32.const 4 |
| 734 | + i32.add |
| 735 | + global.set $~lib/memory/__stack_pointer |
| 736 | + local.get $1 |
| 737 | + ) |
651 | 738 | )
|
0 commit comments