Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

[spec/interpreter/test] Allow nullref type externally #66

Merged
merged 1 commit into from
Dec 13, 2019
Merged

Conversation

rossberg
Copy link
Member

Allow nullref in binary and text format as well as JS API.

Addresses #60.

Copy link
Contributor

@lars-t-hansen lars-t-hansen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, these look good to me.

Copy link
Contributor

@gahaas gahaas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lars-t-hansen
Copy link
Contributor

I have no objections really to the change to ToWebAssemblyValue but it strikes me as not very JS-ish to throw an error if the incoming value is not null; more idiomatic might be to run ToPrimitive and then discard the result of that. (It would be forward-compatible not to make this change now.)

@rossberg
Copy link
Member Author

rossberg commented Dec 9, 2019

@lars-t-hansen, it is consistent with the existing rule for funcref, which doesn't try ToPrimitive either. Null isn't really treated as a value of primitive type in JS (its typeof is "object"), so using ToPrimitive would seem odd.

@lars-t-hansen
Copy link
Contributor

Implementation just landed in SpiderMonkey.

@rossberg
Copy link
Member Author

@lars-t-hansen, great to hear!

Is anything still blocking your approval to the PR?

@lars-t-hansen
Copy link
Contributor

Is anything still blocking your approval to the PR?

Not at all, PR is fine, I was just not asked for review earlier :-)

@rossberg
Copy link
Member Author

Ah, sorry! Thanks for approving anyway!

@rossberg rossberg merged commit d4bc208 into master Dec 13, 2019
@rossberg rossberg deleted the nullref branch December 13, 2019 08:56
aheejin added a commit to aheejin/wabt that referenced this pull request Dec 27, 2019
- Make `ref.func` usable for global initialization expressions
- Allow `nullref` as a full-fledged type, after
  WebAssembly/reference-types#66
- Enable reference types when exnref is used (The reference types
  proposal is a prerequisite of the EH proposal)
- Update spec tests
aheejin added a commit to aheejin/wabt that referenced this pull request Dec 27, 2019
- Make `ref.func` usable for global initialization expressions
- Allow `nullref` as a full-fledged type, after
  WebAssembly/reference-types#66
- Enable reference types when exnref is used (The reference types
  proposal is a prerequisite of the EH proposal)
- Update spec tests
aheejin added a commit to aheejin/wabt that referenced this pull request Dec 27, 2019
- Make `ref.func` usable for global initialization expressions
- Allow `nullref` as a full-fledged type, after
  WebAssembly/reference-types#66
- Enable reference types when exnref is used (The reference types
  proposal is a prerequisite of the EH proposal)
aheejin added a commit to aheejin/wabt that referenced this pull request Dec 27, 2019
- Allow `ref.func` for global initialization expressions
- Allow `nullref` as a full-fledged type, after
  WebAssembly/reference-types#66
- Enable reference types when exnref is used (The reference types
  proposal is a prerequisite of the EH proposal)
aheejin added a commit to aheejin/wabt that referenced this pull request Dec 27, 2019
- Allow `ref.func` for global initialization expressions
- Allow `nullref` as a full-fledged type, after
  WebAssembly/reference-types#66
- Enable reference types when exnref is used (The reference types
  proposal is a prerequisite of the EH proposal)
aheejin added a commit to aheejin/wabt that referenced this pull request Dec 27, 2019
- Allow `ref.func` for global initialization expressions
- Allow `nullref` as a full-fledged type, after
  WebAssembly/reference-types#66
- Enable reference types when exnref is used (The reference types
  proposal is a prerequisite of the EH proposal)
aheejin added a commit to WebAssembly/wabt that referenced this pull request Jan 8, 2020
- Allow `ref.func` for global initialization expressions
- Allow `nullref` as a full-fledged type, after
  WebAssembly/reference-types#66
- Enable reference types when exnref is used (The reference types
  proposal is a prerequisite of the EH proposal)
xeonchen pushed a commit to xeonchen/gecko that referenced this pull request Jan 24, 2020
This commit updates the encoding of nullref to match the one given in
the reference types proposal.

Spec: WebAssembly/reference-types#66

Differential Revision: https://phabricator.services.mozilla.com/D58882
xeonchen pushed a commit to xeonchen/gecko that referenced this pull request Jan 25, 2020
This commit updates the encoding of nullref to match the one given in
the reference types proposal.

Spec: WebAssembly/reference-types#66

Differential Revision: https://phabricator.services.mozilla.com/D58882
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jan 25, 2020
This commit updates the encoding of nullref to match the one given in
the reference types proposal.

Spec: WebAssembly/reference-types#66

Differential Revision: https://phabricator.services.mozilla.com/D58882

--HG--
extra : moz-landing-system : lando
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jan 25, 2020
This commit updates the encoding of nullref to match the one given in
the reference types proposal.

Spec: WebAssembly/reference-types#66

Differential Revision: https://phabricator.services.mozilla.com/D58882

--HG--
extra : moz-landing-system : lando
xeonchen pushed a commit to xeonchen/gecko that referenced this pull request Jan 26, 2020
This commit updates the encoding of nullref to match the one given in
the reference types proposal.

Spec: WebAssembly/reference-types#66

Differential Revision: https://phabricator.services.mozilla.com/D58882
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jan 26, 2020
This commit updates the encoding of nullref to match the one given in
the reference types proposal.

Spec: WebAssembly/reference-types#66

Differential Revision: https://phabricator.services.mozilla.com/D58882

--HG--
extra : moz-landing-system : lando
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Jan 28, 2020
This commit updates the encoding of nullref to match the one given in
the reference types proposal.

Spec: WebAssembly/reference-types#66

Differential Revision: https://phabricator.services.mozilla.com/D58882

UltraBlame original commit: 48c545152a470b7ddd8c9b2ee0ca75ce9c16363f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Jan 28, 2020
This commit updates the encoding of nullref to match the one given in
the reference types proposal.

Spec: WebAssembly/reference-types#66

Differential Revision: https://phabricator.services.mozilla.com/D58882

UltraBlame original commit: f76fa61db00e7985aa70eb01c548478e0ff319ab
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Jan 28, 2020
This commit updates the encoding of nullref to match the one given in
the reference types proposal.

Spec: WebAssembly/reference-types#66

Differential Revision: https://phabricator.services.mozilla.com/D58882

UltraBlame original commit: 985cd0a6aca99bb5bb0b0ad8d2225a019bdf1d58
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Jan 28, 2020
This commit updates the encoding of nullref to match the one given in
the reference types proposal.

Spec: WebAssembly/reference-types#66

Differential Revision: https://phabricator.services.mozilla.com/D58882

UltraBlame original commit: 48c545152a470b7ddd8c9b2ee0ca75ce9c16363f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Jan 28, 2020
This commit updates the encoding of nullref to match the one given in
the reference types proposal.

Spec: WebAssembly/reference-types#66

Differential Revision: https://phabricator.services.mozilla.com/D58882

UltraBlame original commit: f76fa61db00e7985aa70eb01c548478e0ff319ab
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Jan 28, 2020
This commit updates the encoding of nullref to match the one given in
the reference types proposal.

Spec: WebAssembly/reference-types#66

Differential Revision: https://phabricator.services.mozilla.com/D58882

UltraBlame original commit: 985cd0a6aca99bb5bb0b0ad8d2225a019bdf1d58
rossberg pushed a commit that referenced this pull request May 14, 2020
* The data count section is required if the `memory.init` or `data.drop`
  instructions are used.

* `memory.init` had an off-by-one bug when reading at the end of a segment.

* All instructions that operate on regions need to compare length to 0
  using unsigned comparison (e.g. `I32.gt_u n 0l`).

* Converting length from 32- to 64-bit now uses
  `I64_convert.extend_i32_u`, instead of `Int64.of_int32`, since the
  latter will sign-extend.

* The `table.copy` overlap test now uses an unsigned comparison.

* The passive element text syntax still allows function indexes, e.g.
  `(elem passive $f1 $f2)`.

* Add element type to passive element segments
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants