Skip to content

Commit

Permalink
Merge with WebAssembly/spec; and fix unresolved conflicts in documents/
Browse files Browse the repository at this point in the history
  • Loading branch information
dhil committed Dec 3, 2024
2 parents c0bbb8f + 06a88d0 commit 695cd66
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 12 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/w3c-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
# Candidate Recommendation Snapshot).
workflow_dispatch:
inputs:
dry-run:
required: true
type: boolean
description: If set, Echidna will validate but not publish.
w3c-status:
required: true
type: choice
Expand Down Expand Up @@ -60,7 +64,9 @@ jobs:
W3C_ECHIDNA_TOKEN_CORE: ${{ secrets.W3C_ECHIDNA_TOKEN_CORE }}
W3C_ECHIDNA_TOKEN_JSAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_JSAPI }}
W3C_ECHIDNA_TOKEN_WEBAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_WEBAPI }}
ECHIDNA_DRYRUN: ${{ !(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main') }}
ECHIDNA_DRYRUN: |-
${{ (github.event_name == 'workflow_dispatch' && inputs.dry-run) ||
!(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main') }}
- name: Validate ${{ matrix.spec }} spec with Echidna
if: env.W3C_USERNAME
run: cd document && make -e -C ${{ matrix.spec }} WD-echidna
Expand Down
6 changes: 6 additions & 0 deletions document/core/static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,9 @@ div.sphinxsidebar a {
div.sphinxsidebar a:hover {
border-bottom: 1px dotted;
}

@media screen and (max-width: 875px) {
div.bodywrapper {
margin: 0;
}
}
3 changes: 0 additions & 3 deletions document/core/util/bikeshed_fixup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ def Main():
'Validation Algorithm',
'Custom Sections',
'Soundness',
<<<<<<< HEAD
=======
'Type System Properties',
>>>>>>> efa215847ede578fca9d2ad83cdd45a3ca61879e
'Change History',
'Index of Types',
'Index of Instructions',
Expand Down
21 changes: 19 additions & 2 deletions document/js-api/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,24 @@ urlPrefix: https://tc39.github.io/ecma262/; spec: ECMASCRIPT
url: sec-returnifabrupt-shorthands
text: !
text: ?
text: Type; url: sec-ecmascript-data-types-and-values
url: sec-ecmascript-language-types-bigint-type
text: is a BigInt
text: is not a BigInt
url: sec-ecmascript-language-types-boolean-type
text: is a Boolean
text: is not a Boolean
url: sec-ecmascript-language-types-number-type
text: is a Number
text: is not a Number
url: sec-ecmascript-language-types-string-type
text: is a String
text: is not a String
url: sec-ecmascript-language-types-symbol-type
text: is a Symbol
text: is not a Symbol
url: sec-object-type
text: is an Object
text: is not an Object
text: current Realm; url: current-realm
text: ObjectCreate; url: sec-objectcreate
text: CreateBuiltinFunction; url: sec-createbuiltinfunction
Expand Down Expand Up @@ -414,7 +431,7 @@ A {{Module}} object represents a single WebAssembly module. Each {{Module}} obje
1. Let |imports| be « ».
1. [=list/iterate|For each=] (|moduleName|, |componentName|, |externtype|) of [=module_imports=](|module|),
1. Let |o| be [=?=] [$Get$](|importObject|, |moduleName|).
1. If [=Type=](|o|) is not Object, throw a {{TypeError}} exception.
1. If |o| [=is not an Object=], throw a {{TypeError}} exception.
1. Let |v| be [=?=] [$Get$](|o|, |componentName|).
1. If |externtype| is of the form [=external-type/func=] |functype|,
1. If [$IsCallable$](|v|) is false, throw a {{LinkError}} exception.
Expand Down
Binary file modified document/versions/core/WebAssembly-3.0-draft.pdf
Binary file not shown.
15 changes: 9 additions & 6 deletions interpreter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,9 @@ Commands are executed in sequence. Commands taking an optional module name refer

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

The failure string in assertions exists for documentation purposes.
The reference interpreter itself checks that the string is a prefix of the actual error message it generates.

The script format supports additional syntax for defining modules.
A module of the form `(module binary <string>*)` is given in binary form and will be decoded from the (concatenation of the) strings.
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.
Expand All @@ -511,14 +514,14 @@ In that mode, execution may fail with a "crash" error message.
When running scripts, the interpreter predefines a simple host module named `"spectest"` that has the following module type:
```
(module
(global (export "global_i32") i32)
(global (export "global_i64") i64)
(global (export "global_f32") f32)
(global (export "global_f64") f64)
(global (export "global_i32") i32) ;; value 666
(global (export "global_i64") i64) ;; value 666
(global (export "global_f32") f32) ;; value 666.6
(global (export "global_f64") f64) ;; value 666.6
(table (export "table") 10 20 funcref)
(table (export "table") 10 20 funcref) ;; null-initialized
(memory (export "memory") 1 2)
(memory (export "memory") 1 2) ;; zero-initialized
(func (export "print"))
(func (export "print_i32") (param i32))
Expand Down

0 comments on commit 695cd66

Please sign in to comment.