Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 50139ec

Browse files
committed
Merge branch 'main' into wasm-3.0
2 parents e3a6e6b + f662609 commit 50139ec

File tree

8 files changed

+29
-29
lines changed

8 files changed

+29
-29
lines changed

document/core/exec/instructions.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4149,7 +4149,7 @@ Control Instructions
41494149

41504150
6. Pop the values :math:`\val^m` from the stack.
41514151

4152-
7. :ref:`Enter <exec-instr-seq-enter>` the block :math:`\val^m~\instr^\ast` with label :math:`L`.
4152+
7. :ref:`Enter <exec-instr-seq-enter>` the block :math:`\instr^\ast` with label :math:`L` and values :math:`\val^m`.
41534153

41544154
.. math::
41554155
~\\[-1ex]
@@ -4177,7 +4177,7 @@ Control Instructions
41774177

41784178
6. Pop the values :math:`\val^m` from the stack.
41794179

4180-
7. :ref:`Enter <exec-instr-seq-enter>` the block :math:`\val^m~\instr^\ast` with label :math:`L`.
4180+
7. :ref:`Enter <exec-instr-seq-enter>` the block :math:`\instr^\ast` with label :math:`L` and values :math:`\val^m`.
41814181

41824182
.. math::
41834183
~\\[-1ex]
@@ -4881,12 +4881,14 @@ that forms a :ref:`block <exec-instr-control>`.
48814881

48824882
.. _exec-instr-seq-enter:
48834883

4884-
Entering :math:`\instr^\ast` with label :math:`L`
4885-
.................................................
4884+
Entering :math:`\instr^\ast` with label :math:`L` and values :math:`\val^\ast`
4885+
..............................................................................
48864886

48874887
1. Push :math:`L` to the stack.
48884888

4889-
2. Jump to the start of the instruction sequence :math:`\instr^\ast`.
4889+
2. Push the values :math:`\val^\ast` to the stack.
4890+
4891+
3. Jump to the start of the instruction sequence :math:`\instr^\ast`.
48904892

48914893
.. note::
48924894
No formal reduction rule is needed for entering an instruction sequence,
@@ -5010,7 +5012,7 @@ Invocation of :ref:`function address <syntax-funcaddr>` :math:`a`
50105012

50115013
10. Let :math:`L` be the :ref:`label <syntax-label>` whose arity is :math:`m` and whose continuation is the end of the function.
50125014

5013-
11. :ref:`Enter <exec-instr-seq-enter>` the instruction sequence :math:`\instr^\ast` with label :math:`L`.
5015+
11. :ref:`Enter <exec-instr-seq-enter>` the instruction sequence :math:`\instr^\ast` with label :math:`L` and no values.
50145016

50155017
.. math::
50165018
~\\[-1ex]
41.1 KB
Binary file not shown.

interpreter/Makefile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,24 @@ customquiettest/%: $(NAME)
129129
.PHONY: install
130130

131131
install:
132+
rm -f $(NAME).exe
132133
dune build -p $(NAME) @install
133134
dune install
134135

135136
opam-release/%:
136-
git tag opam-$*
137-
git push --tags
137+
#git tag -f opam-$*
138+
#git push -f --tags
138139
rm -f opam-$*.zip
139-
wget https://github.com/WebAssembly/spec/archive/opam-$*.zip
140+
#wget https://github.com/WebAssembly/spec/archive/opam-$*.zip
141+
wget 'https://download-directory.github.io?url=https://github.com/WebAssembly/spec/tree/opam-$*/interpreter&filename=opam-$*.zip'
140142
cp wasm.opam opam
141143
echo "url {" >> opam
142-
echo " src: \"https://github.com/WebAssembly/spec/archive/opam-$*.zip\"" >> opam
143-
echo " checksum: \"md5=`md5 -q opam-$*.zip`\"" >> opam
144+
#echo " src: \"https://github.com/WebAssembly/spec/archive/opam-$*.zip\"" >> opam
145+
echo " src: \"https://download-directory.github.io?url=https://github.com/WebAssembly/spec/tree/opam-$*/interpreter&filename=opam-$*.zip\"" >> opam
146+
echo " checksum: [" >> opam
147+
echo " \"md5=`md5 -q opam-$*.zip`\"" >> opam
148+
echo " \"sha256=`sha256 -q opam-$*.zip`\"" >> opam
149+
echo " ]" >> opam
144150
echo "}" >> opam
145151
rm opam-$*.zip
146152
@echo Created file ./opam, submit to github opam-repository/packages/wasm/wasm.$*/opam

interpreter/dune-project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
(synopsis "Library to read and write WebAssembly (Wasm) files and manipulate their AST")
1717
(tags (wasm webassembly spec interpreter))
1818
(depends
19-
(ocaml (>= 4.12))
19+
(ocaml (>= 4.14))
2020
(menhir (>= 20220210))
2121
)
2222
)

interpreter/main/main.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ let add_custom name =
2929
prerr_endline ("option -c: unknown custom section \"" ^ name ^ "\"");
3030
exit 1
3131

32-
let quote s = "\"" ^ String.escaped s ^ "\""
32+
let quote = Arrange.string
3333

3434
let argspec = Arg.align
3535
[

interpreter/wasm.opam

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,6 @@ depends: [
1414
"menhir" {>= "20220210"}
1515
"odoc" {with-doc}
1616
]
17-
build: [
18-
["dune" "subst"] {dev}
19-
[
20-
"dune"
21-
"build"
22-
"-p"
23-
name
24-
"-j"
25-
jobs
26-
"--promote-install-files=false"
27-
"@install"
28-
"@runtest" {with-test}
29-
"@doc" {with-doc}
30-
]
31-
["dune" "install" "-p" name "--create-install-files" name]
32-
]
17+
build: [make "-C" "interpreter"]
18+
install: [make "-C" "interpreter" "install"]
3319
dev-repo: "git+https://github.com/WebAssembly/spec.git"

test/core/binary.wast

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,6 +1160,7 @@
11601160
(assert_malformed
11611161
(module binary
11621162
"\00asm" "\01\00\00\00"
1163+
"\01\04\01\60\00\00" ;; Type section
11631164
"\03\02\01\00" ;; Function section
11641165
"\08\01\00" ;; Start section: function 0
11651166
"\07\01\00" ;; Export section with zero entries
@@ -1171,6 +1172,7 @@
11711172
(assert_malformed
11721173
(module binary
11731174
"\00asm" "\01\00\00\00"
1175+
"\01\04\01\60\00\00" ;; Type section
11741176
"\03\02\01\00" ;; Function section
11751177
"\09\01\00" ;; Element section with zero entries
11761178
"\08\01\00" ;; Start section: function 0

test/core/data.wast

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
(data (memory $m) (i32.const 1) "a" "" "bcd")
1717
(data (memory $m) (offset (i32.const 0)))
1818
(data (memory $m) (offset (i32.const 0)) "" "a" "bc" "")
19+
(data)
20+
(data "a" "" "bcd")
1921

2022
(data $d1 (i32.const 0))
2123
(data $d2 (i32.const 1) "a" "" "bcd")
@@ -29,6 +31,8 @@
2931
(data $d10 (memory $m) (i32.const 1) "a" "" "bcd")
3032
(data $d11 (memory $m) (offset (i32.const 0)))
3133
(data $d12 (memory $m) (offset (i32.const 0)) "" "a" "bc" "")
34+
(data $d13)
35+
(data $d14 "a" "" "bcd")
3236
)
3337

3438
;; Basic use

0 commit comments

Comments
 (0)