Skip to content

Commit fa755df

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 0d5ac96 + b42efa9 commit fa755df

170 files changed

Lines changed: 16152 additions & 6939 deletions

File tree

Some content is hidden

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

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sudo: on
77

88
install:
99
- ./interpreter/meta/travis/install-ocaml.sh
10-
- sudo pip install sphinx
10+
- sudo pip install sphinx==1.7.9
1111
- sudo apt-get install texlive-full
1212
- git clone https://github.com/tabatkins/bikeshed.git
1313
- pip install --editable $PWD/bikeshed

document/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ publish: all deploy
2121
clean: $(DIRS:%=clean-%)
2222
rm -rf $(BUILDDIR)
2323

24+
.PHONY: diff
25+
diff: $(DIRS:%=diff-%)
26+
2427

2528
# Directory-specific targets.
2629

@@ -54,6 +57,10 @@ $(DIRS:%=clean-%): clean-%:
5457
(cd $(@:clean-%=%); make BUILDDIR=$(BUILDDIR) clean)
5558
rm -rf $(BUILDDIR)/$(@:clean-%=%)
5659

60+
.PHONY: $(DIRS:%=diff-%)
61+
$(DIRS:%=diff-%): diff-%:
62+
(cd $(@:diff-%=%); make BUILDDIR=$(BUILDDIR) diff)
63+
5764

5865
# Help.
5966

document/core/Makefile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ usage:
2727
@echo " html to make standalone HTML files"
2828
@echo " pdf to make standalone PDF file"
2929
@echo " bikeshed to make a bikeshed wrapped single large HTML file"
30+
@echo " diff to make a diff of the bikeshed HTML file with the latest TR"
31+
@echo " WD-tar generate tar file for updating the Working Draft"
32+
@echo " WD-echidna publish the Working Draft tar file via Echidna"
3033
@echo " all to make all 3"
3134
@echo " publish to make all and push to gh-pages"
3235
@echo " help to see more options"
@@ -155,6 +158,43 @@ bikeshed:
155158
@echo
156159
@echo "Build finished. The HTML page is in $(BUILDDIR)/html/bikeshed/."
157160

161+
.PHONY: WD-tar
162+
WD-tar: bikeshed
163+
@echo "Building tar file..."
164+
tar cvf \
165+
$(BUILDDIR)/WD.tar \
166+
--transform='s|$(BUILDDIR)/html/bikeshed/||' \
167+
--transform='s|index.html|Overview.html|' \
168+
$(BUILDDIR)/html/bikeshed/index.html \
169+
$(BUILDDIR)/html/bikeshed/pygments.css \
170+
$(BUILDDIR)/html/bikeshed/katex/dist/katex.css \
171+
$(BUILDDIR)/html/bikeshed/katex/dist/fonts
172+
@echo "Built $(BUILDDIR)/WD.tar."
173+
174+
.PHONY: WD-echidna
175+
WD-echidna: WD-tar
176+
@if [ -z $(W3C_USERNAME) ] || \
177+
[ -z $(W3C_PASSWORD) ] || \
178+
[ -z $(DECISION_URL) ] ; then \
179+
echo "Must provide W3C_USERNAME, W3C_PASSWORD, and DECISION_URL environment variables"; \
180+
exit 1; \
181+
fi
182+
curl 'https://labs.w3.org/echidna/api/request' \
183+
--user '$(W3C_USERNAME):$(W3C_PASSWORD)' \
184+
-F "tar=@$(BUILDDIR)/WD.tar" \
185+
-F "decision=$(DECISION_URL)" | tee $(BUILDDIR)/WD-echidna-id.txt
186+
@echo
187+
@echo "Published working draft. Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
188+
189+
.PHONY: diff
190+
diff: bikeshed
191+
@echo "Downloading the old single-file html spec..."
192+
curl `grep "^TR" index.bs | cut -d' ' -f2` -o $(BUILDDIR)/html/bikeshed/old.html
193+
@echo "Done."
194+
@echo "Diffing new against old (go get a coffee)..."
195+
perl ../util/htmldiff.pl $(BUILDDIR)/html/bikeshed/old.html $(BUILDDIR)/html/bikeshed/index.html $(BUILDDIR)/html/bikeshed/diff.html
196+
@echo "Done. The diff is at $(BUILDDIR)/html/bikeshed/diff.html"
197+
158198
.PHONY: pickle
159199
pickle:
160200
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle

document/core/appendix/algorithm.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,14 @@ The control stack is likewise manipulated through auxiliary functions:
9898
func push_ctrl(opcode : opcode, in : list(val_type), out : list(val_type)) =
9999
 let frame = ctrl_frame(opcode, in, out, opds.size(), false)
100100
  ctrls.push(frame)
101+
push_opds(in)
101102
102103
func pop_ctrl() : ctrl_frame =
103104
 error_if(ctrls.is_empty())
104-
 let frame = ctrls.pop()
105+
 let frame = ctrls[0]
105106
  pop_opds(frame.end_types)
106107
  error_if(opds.size() =/= frame.height)
108+
ctrls.pop()
107109
  return frame
108110
109111
func label_types(frame : ctrl_frame) : list(val_types) =
@@ -167,18 +169,15 @@ Other instructions are checked in a similar manner.
167169
case (block t1*->t2*)
168170
pop_opds([t1*])
169171
push_ctrl(block, [t1*], [t2*])
170-
push_opds([t1*])
171172
172173
case (loop t1*->t2*)
173174
pop_opds([t1*])
174175
push_ctrl(loop, [t1*], [t2*])
175-
push_opds([t1*])
176176
177177
case (if t1*->t2*)
178178
pop_opd(I32)
179179
pop_opds([t1*])
180180
push_ctrl(if, [t1*], [t2*])
181-
push_opds([t1*])
182181
183182
case (end)
184183
let frame = pop_ctrl()
@@ -188,7 +187,6 @@ Other instructions are checked in a similar manner.
188187
let frame = pop_ctrl()
189188
error_if(frame.opcode =/= if)
190189
push_ctrl(else, frame.start_types, frame.end_types)
191-
push_opds(frame.start_types)
192190
193191
case (br n)
194192
     error_if(ctrls.size() < n)

document/core/appendix/embedding.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Modules
173173

174174
2. Let :math:`\export^\ast` be the :ref:`exports <syntax-export>` :math:`\module.\MEXPORTS`.
175175

176-
3. Assert: the length of :math:`\export^\ast` equals the length of :math:`\externtype^\ast`.
176+
3. Assert: the length of :math:`\export^\ast` equals the length of :math:`{\externtype'}^\ast`.
177177

178178
4. For each :math:`\export_i` in :math:`\export^\ast` and corresponding :math:`\externtype'_i` in :math:`{\externtype'}^\ast`, do:
179179

@@ -335,7 +335,7 @@ Tables
335335

336336
3. Let :math:`\X{ti}` be the :ref:`table instance <syntax-tableinst>` :math:`\store.\STABLES[\tableaddr]`.
337337

338-
4. If :math:`i` is larger than or equal to the length if :math:`\X{ti}.\TIELEM`, then return :math:`\ERROR`.
338+
4. If :math:`i` is larger than or equal to the length of :math:`\X{ti}.\TIELEM`, then return :math:`\ERROR`.
339339

340340
5. Else, return :math:`\X{ti}.\TIELEM[i]`.
341341

@@ -357,7 +357,7 @@ Tables
357357

358358
3. Let :math:`\X{ti}` be the :ref:`table instance <syntax-tableinst>` :math:`\store.\STABLES[\tableaddr]`.
359359

360-
4. If :math:`i` is larger than or equal to the length if :math:`\X{ti}.\TIELEM`, then return :math:`\ERROR`.
360+
4. If :math:`i` is larger than or equal to the length of :math:`\X{ti}.\TIELEM`, then return :math:`\ERROR`.
361361

362362
5. Replace :math:`\X{ti}.\TIELEM[i]` with the optional :ref:`function address <syntax-funcaddr>` :math:`\X{fa}^?`.
363363

@@ -461,7 +461,7 @@ Memories
461461

462462
3. Let :math:`\X{mi}` be the :ref:`memory instance <syntax-meminst>` :math:`\store.\SMEMS[\memaddr]`.
463463

464-
4. If :math:`i` is larger than or equal to the length if :math:`\X{mi}.\MIDATA`, then return :math:`\ERROR`.
464+
4. If :math:`i` is larger than or equal to the length of :math:`\X{mi}.\MIDATA`, then return :math:`\ERROR`.
465465

466466
5. Else, return the :ref:`byte <syntax-byte>` :math:`\X{mi}.\MIDATA[i]`.
467467

@@ -483,7 +483,7 @@ Memories
483483

484484
3. Let :math:`\X{mi}` be the :ref:`memory instance <syntax-meminst>` :math:`\store.\SMEMS[\memaddr]`.
485485

486-
4. If :math:`i` is larger than or equal to the length if :math:`\X{mi}.\MIDATA`, then return :math:`\ERROR`.
486+
4. If :math:`i` is larger than or equal to the length of :math:`\X{mi}.\MIDATA`, then return :math:`\ERROR`.
487487

488488
5. Replace :math:`\X{mi}.\MIDATA[i]` with :math:`\byte`.
489489

0 commit comments

Comments
 (0)