Skip to content

Commit 48e69f3

Browse files
committed
Merge remote-tracking branch 'upstream/main' into merge2
2 parents 3eecdce + c7eef19 commit 48e69f3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+1671
-2240
lines changed

.github/workflows/ci-interpreter.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
ocaml-compiler: 4.12.x
2525
- name: Setup OCaml tools
26-
run: opam install --yes ocamlbuild.0.14.0 ocamlfind.1.9.5 js_of_ocaml.4.0.0 js_of_ocaml-ppx.4.0.0
26+
run: opam install --yes ocamlfind.1.9.5 js_of_ocaml.4.0.0 js_of_ocaml-ppx.4.0.0
2727
- name: Setup Node.js
2828
uses: actions/setup-node@v2
2929
with:

.github/workflows/main.yml

-96
This file was deleted.

.github/workflows/mirror.yml

-17
This file was deleted.

README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
![Build Status](https://github.com/WebAssembly/memory64/actions/workflows/main.yml/badge.svg)
1+
[![CI for specs](https://github.com/WebAssembly/memory64/actions/workflows/ci-spec.yml/badge.svg)](https://github.com/WebAssembly/memory64/actions/workflows/ci-spec.yml)
2+
[![CI for interpreter & tests](https://github.com/WebAssembly/memory64/actions/workflows/ci-interpreter.yml/badge.svg)](https://github.com/WebAssembly/memory64/actions/workflows/ci-interpreter.yml)
23

34
# Memory64 Proposal for WebAssembly
45

@@ -12,8 +13,6 @@ add support for 64-bit memory indexes to WebAssembly.
1213

1314
Original `README` from upstream repository follows...
1415

15-
![Build Status](https://github.com/WebAssembly/spec/actions/workflows/main.yml/badge.svg)
16-
1716
# spec
1817

1918
This repository holds the sources for the WebAssembly draft specification

document/core/Makefile

+20-11
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,14 @@ bikeshed-keep:
8989
echo Downloaded Bikeshed.
9090

9191

92-
.PHONY: index
93-
index:
94-
(cd appendix; ./gen-index-instructions.py)
92+
GENERATED = appendix/index-instructions.rst
93+
.INTERMEDIATE: $(GENERATED)
94+
95+
%.rst: %.py
96+
(cd `dirname $@`; ./`basename $^`)
9597

9698
.PHONY: pdf
97-
pdf: index latexpdf
99+
pdf: $(GENERATED) latexpdf
98100
mkdir -p $(BUILDDIR)/html/$(DOWNLOADDIR)
99101
ln -f $(BUILDDIR)/latex/$(NAME).pdf $(BUILDDIR)/html/$(DOWNLOADDIR)/$(NAME).pdf
100102

@@ -103,9 +105,10 @@ pdf: index latexpdf
103105
clean:
104106
rm -rf $(BUILDDIR)
105107
rm -rf $(STATICDIR)
108+
rm -f $(GENERATED)
106109

107110
.PHONY: html
108-
html: index
111+
html: $(GENERATED)
109112
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
110113
for file in `ls $(BUILDDIR)/html/*.html`; \
111114
do \
@@ -121,28 +124,34 @@ html: index
121124
@echo "Build finished. The HTML pages are in `pwd`/$(BUILDDIR)/html/."
122125

123126
.PHONY: dirhtml
124-
dirhtml:
127+
dirhtml: $(GENERATED)
125128
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
126129
@echo
127130
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
128131

129132
.PHONY: singlehtml
130-
singlehtml:
133+
singlehtml: $(GENERATED)
131134
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
132135
@echo
133136
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
134137

135138
.PHONY: bikeshed
136-
bikeshed:
139+
bikeshed: $(GENERATED)
137140
$(SPHINXBUILD) -b singlehtml -c util/bikeshed \
138141
$(ALLSPHINXOPTS) $(BUILDDIR)/bikeshed_singlehtml
139-
python util/bikeshed_fixup.py $(BUILDDIR)/bikeshed_singlehtml/index.html \
142+
python3 util/bikeshed_fixup.py $(BUILDDIR)/bikeshed_singlehtml/index.html \
140143
>$(BUILDDIR)/bikeshed_singlehtml/index_fixed.html
144+
@echo ==== Showing contents of _build/bikeshed_singlehtml/index_fixed.html ====
145+
@head -n10 _build/bikeshed_singlehtml/index_fixed.html
146+
@echo ... skipping $$(expr `cat _build/bikeshed_singlehtml/index_fixed.html | wc -l` - 20) lines ...
147+
@tail -n10 _build/bikeshed_singlehtml/index_fixed.html
148+
@echo
149+
@echo =========================================================================
141150
mkdir -p $(BUILDDIR)/bikeshed_mathjax/
142151
bikeshed spec index.bs $(BUILDDIR)/bikeshed_mathjax/index.html
143152
mkdir -p $(BUILDDIR)/html/bikeshed/
144153
(cd util/katex/ && yarn && yarn build && npm install --only=prod)
145-
python util/mathjax2katex.py $(BUILDDIR)/bikeshed_mathjax/index.html \
154+
python3 util/mathjax2katex.py $(BUILDDIR)/bikeshed_mathjax/index.html \
146155
>$(BUILDDIR)/html/bikeshed/index.html
147156
mkdir -p $(BUILDDIR)/html/bikeshed/katex/dist/
148157
cp -r util/katex/dist/* $(BUILDDIR)/html/bikeshed/katex/dist/
@@ -259,7 +268,7 @@ latex:
259268
"(use \`make latexpdf' here to do that automatically)."
260269

261270
.PHONY: latexpdf
262-
latexpdf:
271+
latexpdf: $(GENERATED)
263272
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
264273
@echo "Running LaTeX files through pdflatex..."
265274
$(MAKE) -C $(BUILDDIR)/latex LATEXMKOPTS=" </dev/null" all-pdf >$(BUILDDIR)/latex/LOG 2>&1 || cat $(BUILDDIR)/latex/LOG

document/core/appendix/embedding.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Failure of an interface operation is indicated by an auxiliary syntactic class:
3333

3434
.. math::
3535
\begin{array}{llll}
36-
\production{(error)} & \error &::=& \ERROR \\
36+
\production{error} & \error &::=& \ERROR \\
3737
\end{array}
3838
3939
In addition to the error conditions specified explicitly in this section, implementations may also return errors when specific :ref:`implementation limitations <impl>` are reached.
@@ -323,7 +323,7 @@ Tables
323323

324324
.. _embed-table-alloc:
325325

326-
:math:`\F{table\_alloc}(\store, \tabletype) : (\store, \tableaddr, \reff)`
326+
:math:`\F{table\_alloc}(\store, \tabletype, \reff) : (\store, \tableaddr)`
327327
..........................................................................
328328

329329
1. Pre-condition: :math:`\tabletype` is :ref:`valid <valid-tabletype>`.

document/core/appendix/gen-index-instructions.py document/core/appendix/index-instructions.py

+8-9
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
INDEX_INSTRUCTIONS_RST = os.path.join(SCRIPT_DIR, 'index-instructions.rst')
1313

1414
HEADER = """\
15-
.. DO NOT EDIT: This file is auto-generated by the gen-index-instructions.py script.
15+
.. DO NOT EDIT: This file is auto-generated by the index-instructions.py script.
1616
1717
.. index:: instruction
1818
.. _index-instr:
@@ -54,8 +54,7 @@ def RefWrap(s, kind):
5454

5555
def Instruction(name, opcode, type=None, validation=None, execution=None, operator=None):
5656
if operator:
57-
execution_str = ', '.join([RefWrap(execution, 'execution'),
58-
RefWrap(operator, 'operator')])
57+
execution_str = RefWrap(execution, 'execution') + ' (' + RefWrap(operator, 'operator') + ')'
5958
else:
6059
execution_str = RefWrap(execution, 'execution')
6160

@@ -427,12 +426,12 @@ def Instruction(name, opcode, type=None, validation=None, execution=None, operat
427426
Instruction(r'\V128.\LOAD\K{16\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{55}', r'[\I32~\V128] \to [\V128]', r'valid-load-lane', r'exec-load-lane'),
428427
Instruction(r'\V128.\LOAD\K{32\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{56}', r'[\I32~\V128] \to [\V128]', r'valid-load-lane', r'exec-load-lane'),
429428
Instruction(r'\V128.\LOAD\K{64\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{57}', r'[\I32~\V128] \to [\V128]', r'valid-load-lane', r'exec-load-lane'),
430-
Instruction(r'\V128.\STORE\K{8\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{58}', r'[\I32~\V128] \to [\V128]', r'valid-store-lane', r'exec-store-lane'),
431-
Instruction(r'\V128.\STORE\K{16\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{59}', r'[\I32~\V128] \to [\V128]', r'valid-store-lane', r'exec-store-lane'),
432-
Instruction(r'\V128.\STORE\K{32\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{5A}', r'[\I32~\V128] \to [\V128]', r'valid-store-lane', r'exec-store-lane'),
433-
Instruction(r'\V128.\STORE\K{64\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{5B}', r'[\I32~\V128] \to [\V128]', r'valid-store-lane', r'exec-store-lane'),
434-
Instruction(r'\V128.\LOAD\K{32\_zero}~\memarg~\laneidx', r'\hex{FD}~~\hex{5C}', r'[\I32] \to [\V128]', r'valid-load-zero', r'exec-load-zero'),
435-
Instruction(r'\V128.\LOAD\K{64\_zero}~\memarg~\laneidx', r'\hex{FD}~~\hex{5D}', r'[\I32] \to [\V128]', r'valid-load-zero', r'exec-load-zero'),
429+
Instruction(r'\V128.\STORE\K{8\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{58}', r'[\I32~\V128] \to []', r'valid-store-lane', r'exec-store-lane'),
430+
Instruction(r'\V128.\STORE\K{16\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{59}', r'[\I32~\V128] \to []', r'valid-store-lane', r'exec-store-lane'),
431+
Instruction(r'\V128.\STORE\K{32\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{5A}', r'[\I32~\V128] \to []', r'valid-store-lane', r'exec-store-lane'),
432+
Instruction(r'\V128.\STORE\K{64\_lane}~\memarg~\laneidx', r'\hex{FD}~~\hex{5B}', r'[\I32~\V128] \to []', r'valid-store-lane', r'exec-store-lane'),
433+
Instruction(r'\V128.\LOAD\K{32\_zero}~\memarg', r'\hex{FD}~~\hex{5C}', r'[\I32] \to [\V128]', r'valid-load-zero', r'exec-load-zero'),
434+
Instruction(r'\V128.\LOAD\K{64\_zero}~\memarg', r'\hex{FD}~~\hex{5D}', r'[\I32] \to [\V128]', r'valid-load-zero', r'exec-load-zero'),
436435
Instruction(r'\F32X4.\VDEMOTE\K{\_f64x2\_zero}', r'\hex{FD}~~\hex{5E}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-demote'),
437436
Instruction(r'\F64X2.\VPROMOTE\K{\_low\_f32x4}', r'\hex{FD}~~\hex{5F}', r'[\V128] \to [\V128]', r'valid-vcvtop', r'exec-vcvtop', r'op-promote'),
438437
Instruction(r'\I8X16.\VABS', r'\hex{FD}~~\hex{60}', r'[\V128] \to [\V128]', r'valid-vunop', r'exec-vunop', r'op-iabs'),

0 commit comments

Comments
 (0)