Skip to content

Commit 1756069

Browse files
committed
Merge branch 'main' into wasm-3.0
2 parents f3be162 + 05949f5 commit 1756069

File tree

9 files changed

+52
-18
lines changed

9 files changed

+52
-18
lines changed

.github/workflows/w3c-publish.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ on:
1515
# Candidate Recommendation Snapshot).
1616
workflow_dispatch:
1717
inputs:
18+
dry-run:
19+
required: true
20+
type: boolean
21+
description: If set, Echidna will validate but not publish.
1822
w3c-status:
1923
required: true
2024
type: choice
@@ -27,7 +31,7 @@ on:
2731

2832
env:
2933
YARN_ENABLE_IMMUTABLE_INSTALLS: false
30-
W3C_STATUS: ${{ github.event_name == 'workflow_dispatch' && inputs.w3c-status || 'WD' }}
34+
W3C_STATUS: ${{ github.event_name == 'workflow_dispatch' && inputs.w3c-status || 'CRD' }}
3135

3236
jobs:
3337
publish-to-w3c-TR:
@@ -60,7 +64,10 @@ jobs:
6064
W3C_ECHIDNA_TOKEN_CORE: ${{ secrets.W3C_ECHIDNA_TOKEN_CORE }}
6165
W3C_ECHIDNA_TOKEN_JSAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_JSAPI }}
6266
W3C_ECHIDNA_TOKEN_WEBAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_WEBAPI }}
63-
ECHIDNA_DRYRUN: ${{ !(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main') }}
67+
# Publish the draft on manual dispatches without dry-run set, or on pushes to the main branch.
68+
ECHIDNA_DRYRUN: |-
69+
${{ !((github.event_name == 'workflow_dispatch' && !inputs.dry-run) ||
70+
(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main')) }}
6471
- name: Validate ${{ matrix.spec }} spec with Echidna
6572
if: env.W3C_USERNAME
6673
run: cd document && make -e -C ${{ matrix.spec }} WD-echidna

document/core/binary/modules.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -611,5 +611,5 @@ where for each :math:`t_i^\ast, e_i` in :math:`\X{code}^n`,
611611
The version of the WebAssembly binary format may increase in the future
612612
if backward-incompatible changes have to be made to the format.
613613
However, such changes are expected to occur very infrequently, if ever.
614-
The binary format is intended to be forward-compatible,
615-
such that future extensions can be made without incrementing its version.
614+
The binary format is intended to be extensible,
615+
such that future features can be added without incrementing its version.

document/core/exec/numerics.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1717,7 +1717,7 @@ It computes :math:`(z_1 \cdot z_2) + z_3` as if with unbounded range and precisi
17171717

17181718
* Else if both :math:`z_1` and :math:`z_2` are zeroes, then return :math:`1`.
17191719

1720-
* Else if :math:`z_1` is smaller than or equal to :math:`z_2`, then return :math:`1`.
1720+
* Else if :math:`z_1` is larger than or equal to :math:`z_2`, then return :math:`1`.
17211721

17221722
* Else return :math:`0`.
17231723

document/core/static/custom.css

+6
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,9 @@ div.sphinxsidebar a {
8282
div.sphinxsidebar a:hover {
8383
border-bottom: 1px dotted;
8484
}
85+
86+
@media screen and (max-width: 875px) {
87+
div.bodywrapper {
88+
margin: 0;
89+
}
90+
}

document/core/util/bikeshed_fixup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def Main():
6565
# get carried over into the resulting bikeshed output and then end up causing
6666
# the W3C pubrules checker to refuse to autopublish that bikeshed output.
6767
data = re.sub(r'.+?(<div class="toctree-wrapper compound">.+)',
68-
r'<!doctype HTML>\n<meta charset="utf-8">\n<body>\1',
68+
r'<!doctype HTML>\n<meta charset="utf-8">\n<body><section id="webassembly-specification">\1',
6969
data, flags=re.DOTALL)
7070

7171
# Drop spurious navigation from footer.

document/js-api/index.bs

+20-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,24 @@ urlPrefix: https://tc39.github.io/ecma262/; spec: ECMASCRIPT
4646
url: sec-returnifabrupt-shorthands
4747
text: !
4848
text: ?
49-
text: Type; url: sec-ecmascript-data-types-and-values
49+
url: sec-ecmascript-language-types-bigint-type
50+
text: is a BigInt
51+
text: is not a BigInt
52+
url: sec-ecmascript-language-types-boolean-type
53+
text: is a Boolean
54+
text: is not a Boolean
55+
url: sec-ecmascript-language-types-number-type
56+
text: is a Number
57+
text: is not a Number
58+
url: sec-ecmascript-language-types-string-type
59+
text: is a String
60+
text: is not a String
61+
url: sec-ecmascript-language-types-symbol-type
62+
text: is a Symbol
63+
text: is not a Symbol
64+
url: sec-object-type
65+
text: is an Object
66+
text: is not an Object
5067
text: current Realm; url: current-realm
5168
text: ObjectCreate; url: sec-objectcreate
5269
text: CreateBuiltinFunction; url: sec-createbuiltinfunction
@@ -414,7 +431,7 @@ A {{Module}} object represents a single WebAssembly module. Each {{Module}} obje
414431
1. Let |imports| be « ».
415432
1. [=list/iterate|For each=] (|moduleName|, |componentName|, |externtype|) of [=module_imports=](|module|),
416433
1. Let |o| be [=?=] [$Get$](|importObject|, |moduleName|).
417-
1. If [=Type=](|o|) is not Object, throw a {{TypeError}} exception.
434+
1. If |o| [=is not an Object=], throw a {{TypeError}} exception.
418435
1. Let |v| be [=?=] [$Get$](|o|, |componentName|).
419436
1. If |externtype| is of the form [=external-type/func=] |functype|,
420437
1. If [$IsCallable$](|v|) is false, throw a {{LinkError}} exception.
@@ -1333,7 +1350,7 @@ The algorithm <dfn>ToWebAssemblyValue</dfn>(|v|, |type|) coerces a JavaScript va
13331350
1. Let |n| be an implementation-defined integer such that [=canon=]<sub>32</sub> &leq; |n| &lt; 2<sup>[=signif=](32)</sup>.
13341351
1. Let |f32| be [=nan=](n).
13351352
1. Otherwise,
1336-
1. Let |f32| be |number| rounded to the nearest representable value using IEEE 754-2008 round to nearest, ties to even mode. [[IEEE-754]]
1353+
1. Let |f32| be |number| rounded to the nearest representable value using IEEE 754-2019 round to nearest, ties to even mode. [[IEEE-754]]
13371354
1. Return [=f32.const=] |f32|.
13381355
1. If |type| is [=f64=],
13391356
1. Let |number| be [=?=] [$ToNumber$](|v|).

interpreter/README.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,9 @@ Commands are executed in sequence. Commands taking an optional module name refer
487487

488488
After a module is _registered_ under a string name it is available for importing in other modules.
489489

490+
The failure string in assertions exists for documentation purposes.
491+
The reference interpreter itself checks that the string is a prefix of the actual error message it generates.
492+
490493
The script format supports additional syntax for defining modules.
491494
A module of the form `(module binary <string>*)` is given in binary form and will be decoded from the (concatenation of the) strings.
492495
A module of the form `(module quote <string>*)` is given in textual form and will be parsed from the (concatenation of the) strings. In both cases, decoding/parsing happens when the command is executed, not when the script is parsed, so that meta commands like `assert_malformed` can be used to check expected errors.
@@ -511,14 +514,14 @@ In that mode, execution may fail with a "crash" error message.
511514
When running scripts, the interpreter predefines a simple host module named `"spectest"` that has the following module type:
512515
```
513516
(module
514-
(global (export "global_i32") i32)
515-
(global (export "global_i64") i64)
516-
(global (export "global_f32") f32)
517-
(global (export "global_f64") f64)
517+
(global (export "global_i32") i32) ;; value 666
518+
(global (export "global_i64") i64) ;; value 666
519+
(global (export "global_f32") f32) ;; value 666.6
520+
(global (export "global_f64") f64) ;; value 666.6
518521
519-
(table (export "table") 10 20 funcref)
522+
(table (export "table") 10 20 funcref) ;; null-initialized
520523
521-
(memory (export "memory") 1 2)
524+
(memory (export "memory") 1 2) ;; zero-initialized
522525
523526
(func (export "print"))
524527
(func (export "print_i32") (param i32))

test/build.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,10 @@ def build_html_from_js(tests, html_dir, use_sync):
165165
html_file = os.path.join(html_dir, subdir, html_filename)
166166
js_harness = "sync_index.js" if use_sync else "async_index.js"
167167
harness_dir = os.path.join(js_prefix, 'harness')
168+
168169
with open(html_file, 'w+') as f:
169170
content = HTML_HEADER.replace('{PREFIX}', harness_dir) \
170-
.replace('{WPT_PREFIX}', harness_dir) \
171+
.replace('{WPT_PREFIX}', '/resources') \
171172
.replace('{JS_HARNESS}', js_harness)
172173
content += ' <script src="' + js_filename + '"></script>'
173174
content += HTML_BOTTOM

test/core/float_exprs.wast

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
(assert_return (invoke "f64.no_fma" (f64.const 0x1.7e2c44058a799p+52) (f64.const 0x1.c73b71765b8b2p+685) (f64.const -0x1.16c641df0b108p+690)) (f64.const 0x1.53ccb53de0bd1p+738))
3636

3737
;; Test that x+0.0 is not folded to x.
38-
;; See IEEE 754-2008 10.4 "Literal meaning and value-changing optimizations".
38+
;; See IEEE 754-2019 10.4 "Literal meaning and value-changing optimizations".
3939

4040
(module
4141
(func (export "f32.no_fold_add_zero") (param $x f32) (result f32)
@@ -94,7 +94,7 @@
9494
(assert_return (invoke "f64.no_fold_mul_zero" (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic))
9595

9696
;; Test that x*1.0 is not folded to x.
97-
;; See IEEE 754-2008 10.4 "Literal meaning and value-changing optimizations".
97+
;; See IEEE 754-2019 10.4 "Literal meaning and value-changing optimizations".
9898

9999
(module
100100
(func (export "f32.no_fold_mul_one") (param $x f32) (result f32)

0 commit comments

Comments
 (0)