File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
tests/regression/ba-issues/issues/issue-4644 Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
- ;; 定义数组类型 - i32数组
1
+ ;; define array type - i32 array
2
2
(type $i32_array (array (mut i32 )))
3
3
4
- ;; main函数
4
+ ;; main function
5
5
(func $main
6
6
(local $arr (ref $i32_array ))
7
7
8
- ;; 创建一个大小为10的i32数组,初始值为0
8
+ ;; create an i32 array of size 10 with initial value 0
9
9
(array.new $i32_array
10
- (i32.const 0 ) ;; 初始值
11
- (i32.const 10 )) ;; 数组大小
10
+ (i32.const 0 ) ;; initial value
11
+ (i32.const 10 )) ;; array size
12
12
(local.set $arr )
13
13
14
- ;; 使用 array.fill 填充数组
14
+ ;; fill array using array .fill
15
15
(array.fill $i32_array
16
- (local.get $arr ) ;; 数组引用
17
- (i32.const 0 ) ;; 起始索引
18
- (i32.const 42 ) ;; 填充值
19
- (i32.const 10 )) ;; 填充长度 - 填满整个数组
16
+ (local.get $arr ) ;; array reference
17
+ (i32.const 0 ) ;; start index
18
+ (i32.const 42 ) ;; fill value
19
+ (i32.const 10 )) ;; fill length - fill entire array
20
20
)
21
21
22
22
(memory 1 )
You can’t perform that action at this time.
0 commit comments