Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update the doc comment of the assignBuckets so it explains the overview of the algorithm #5007

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

Closed
wants to merge 43 commits into from

Conversation

tanishiking
Copy link
Contributor

@tanishiking tanishiking commented Jul 18, 2024

change : a6b6746

In response to the review by @gzm0 #4988 (comment) this PR update the doc comment of the assignBuckets so it explains the overview of the algorithm.

The interface of assignBuckets is already refactored by d4b7147 :P

It'd be great to be cherry-picked into #4988 if it's approved.

sjrd and others added 30 commits July 1, 2024 10:37
If an object is sealed, `captureStackTrace` throws an exception.
This will happen for WebAssembly objects.

We now detect this case and fall back to instantiating a dedicated
`js.Error` object.
We now directly use `import("./main.js")` or `require("./main.js")`
rather than relying on the compilation scheme of `js.dynamicImport`.

This will allow `ExportLoopback` to work under WebAssembly,
although the initial implementation will not support multiple
modules.
This commit contains the initial implementation of the WebAssembly
backend. This backend is still experimental, in the sense that:

* We may remove it in a future Minor version, if we decide that it
  has a better place elsewhere, and
* Newer minor versions may produce WebAssembly code that requires
  more recent WebAssembly features.

The WebAssembly backend silently ignores `@JSExport` and
`@JSExportAll` annotations. It is otherwise supposed to support
the full Scala.js language semantics.

Currently, the backend only supports some configurations of the
linker. It requires:

* No optimizer,
* Unchecked semantics for undefined behaviors,
* Strict floats, and
* ES modules.

Some of those will be relaxed in the future, definitely including
the first two.

Co-authored-by: Rikito Taniguchi <[email protected]>
We can rely on the `ToNumber(v)` conversions performed by
`ToWebAssemblyValue` instead of doing `null` handling ourselves.
Also reorder Instructions by opcode.
Except using a typeclass for the block types in `FunctionBuilder`.
We still need an overload of each method for the empty block type,
but the other ones disappear.

Also, we cannot remove the boilerplate from the `switch` overloads,
since `switch` ultimately wants a pair of `FunctionType`s so that
it can decompose them. It could not do that with `BlockType`s.
If a class or interface does not exist but it is mentioned in a
type, it means it had no instances. Therefore, we can transform it
to `nullref`.
Discovered while adding checked behaviors for CCEs.
@sjrd
Copy link
Member

sjrd commented Jul 19, 2024

Thanks. Cherry-picked and reformatted into #4988.

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.

2 participants