Skip to content

Commit 2ce332a

Browse files
committed
Rewrite comments in English
1 parent f020a08 commit 2ce332a

File tree

1 file changed

+10
-10
lines changed
  • tests/regression/ba-issues/issues/issue-4644

1 file changed

+10
-10
lines changed

tests/regression/ba-issues/issues/issue-4644/test.wat

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
;; 定义数组类型 - i32数组
1+
;; define array type - i32 array
22
(type $i32_array (array (mut i32)))
33

4-
;; main函数
4+
;; main function
55
(func $main
66
(local $arr (ref $i32_array))
77

8-
;; 创建一个大小为10的i32数组,初始值为0
8+
;; create an i32 array of size 10 with initial value 0
99
(array.new $i32_array
10-
(i32.const 0) ;; 初始值
11-
(i32.const 10)) ;; 数组大小
10+
(i32.const 0) ;; initial value
11+
(i32.const 10)) ;; array size
1212
(local.set $arr)
1313

14-
;; 使用 array.fill 填充数组
14+
;; fill array using array.fill
1515
(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
2020
)
2121

2222
(memory 1)

0 commit comments

Comments
 (0)