Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Threads merge upstream spec #196

Closed
wants to merge 269 commits into from
Closed

Conversation

ioannad
Copy link
Contributor

@ioannad ioannad commented Dec 12, 2022

At the moment this is merged up to spec commit f9b461a

The document should build, but not yet the interpreter.

To try and make sure no threads addition was left out, I created a branch spec-old at the latest commit of the upstream spec that was merged previously, (that is I think 7526564b56c30250b66504fe795e9c1e88a938af), and compared (with diff and with meld):

  • the output of git diff spec-old threads/main > old-changes.diff
  • with the output of git diff spec/main threads-update > updated-changes.diff

So the comparison was done with inspecting meld old-changes.diff updated-changes.diff and editing appropriately.

eqrion and others added 30 commits March 25, 2020 11:35
The following test was failing in SpiderMonkey:

(module $Global
  (export "e" (global $g))
  (global $g i32 (i32.const 42))
)
(assert_return (get "e") (i32.const 42))

The issue was a generated call to index.js `get` which would return the
exported WebAssembly.Global object and compare it to a literal 42.

The harness emitted by js.ml seems to include this check. Not sure why
that's a separate harness, but for now it seems good to have the check
in all harnesses.
1. shelve.DbfilenameShelf no longer has has_key, use `in`
2. dict no longer has iteritems(), use items()
3. open subprocess as text, since we are passing text to it
latex_paper_size is deprecated since 1.6.1 [0]. Also add override
keyword when adding node to silence the warnings.

[0] https://www.sphinx-doc.org/en/master/changes.html#id100
* Upgrade Sphinx to 2.3.0 and fixes to extensions

Couple of breaking changes due to the Sphinx upgrade, requiring fixes:

1. node['latex'] is an invalid access. It was used when Sphinx created
custom math nodes for the math role. But now that docutils supports it,
we don't need to do this anymore.
2. we copied latex_visit_math and latex_visit_displaymath from sphinx's
LaTeXTranslator visit_math and visit_math_block, we can't call them
directly because those call respective superclass methods, and since we
call add_node, it will override those methods with ext_latex_visit_math,
and ending up in a stack overflow.
3. directly create a math node rather than calling into docutils
math_role, because it only looks at raw_text, and overrides text,
which contains what we care about (latex code).
4. Similar changes to mathdefbs

Finally we can pin the Sphinx version to 2.3.0 in .travis.yml.

I mostly manually verified that this change is okay, looking at the html
(multi-page), html (single-page), and pdf, checking the math equations,
both inline and block, making sure the links still work.

Issue #1157

* Fix Sphinx name in travis.yml

* No sudo for pip install Sphinx

* Add TODOs for code copied from sphinx
* WIP upgrade to bionic

* Remove c++ from language in .travis.yml

* Remove extra apt-get instructions
With the Sphinx upgrade in #1157 we no longer need these sed commands.
At the same time, clean up the way we configure mathjax, using a config
value, instead of sed.
* Fix TeX maxbuffer option for MathJax

The configuration is case sensitive.

Fixes #1166

* Update comment to MathJax TeX configuration
With #1162, we install ocaml via apt, not via our download script, so we
no longer need to modify the PATH to find ocaml.
Instead of overwriting the nodes, we extend the translators provided by
Sphinx, and customize the visit_math and visit_math_block logic, to do
our hyperlinking logic before calling the base class visit methods. This
allows us to deduplicate the logic we copied earlier.

For mathdefbs.py, remove all latex related logic, since we don't use
this extension to build latex.

Issue #1157
See the sign-extension-ops proposal here:

https://github.com/WebAssembly/sign-extension-ops

This PR is built on top of #1143 (merge nontrapping-float-to-int).
See the multi-value proposal here:

https://github.com/WebAssembly/multi-value

This PR is built on top of the following PRs:

* #1143 (merge nontrapping-float-to-int)
* #1144 (merge sign-extension-ops)
There are already tests for effective address overflow, but those have a
large value baked into the offset. These tests all use `1` as the
immediate offset, and use `-1` for the address on the stack, which may
be compiled differently.
We've recently found a bug in a WebAssembly library we've been working
with where we're mapping WebAssembly to a tree-like IR internally. The
way we parse into this representation, however, has a bug when the
function isn't itself tree-like but rather exibits properties that
exploit a stack machine. For example this isn't so straightforward to
represent in a tree-like fashion:

    (import "" "a" (func $foo))
    (import "" "b" (func $foo (result i32)))
    (func (result i32)
      call $b
      call $b
      call $a
      i32.xor)

The extra `call $a` in the middle is valid `WebAssembly` but needs
special treatment when converting to a more tree-like IR format. I
figured it'd be good to ensure there's a spec test covering this case as
we currently pass the suite of spec tests but still contain this bug!
This also required disambiguating the references to "module", as there are now
two definitions by that name.
rossberg and others added 28 commits August 11, 2022 15:33
Improve wording.
WebAssembly/spec@82a613d added `print_i64` to the standalone test files, but not to the ones generated by the spec interpreter.
Rather than describing keyword tokens as always being defined implicitly by terminal symbols in syntactic productions, describe them as being defined implicitly or explicitly. This accounts for the explicit definitions of `offset` and `align` phrases, which are lexically keywords, later in the chapter.

Fixes #1552.
@conrad-watt
Copy link
Collaborator

conrad-watt commented Aug 9, 2023

The latest changes to the upstream-rebuild branch (tracking issue #198) should mean that this PR is now superseded.

@conrad-watt conrad-watt closed this Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.