Rename memory instructions; Rework constant handling #177
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A relatively bulky collection of breaking, but mostly unavoidable, changes.
Renamed memory instructions as proposed by the bulk-memory-operations spec:
current_memory
->memory.size
grow_memory
->memory.grow
move_memory
->memory.copy
(still polyfilled)set_memory
->memory.fill
(still polyfilled)Moved memory management functions to the
memory
namespace as well:allocate_memory
->memory.allocate
free_memory
->memory.free
compare_memory
->memory.compare
Removed automatic inlining of constant globals and leaves them for Binaryen to decide (see Support constant globals in precompute pass WebAssembly/binaryen#1622)
Improved 'const' enum compatibility. In turn can't export non-const enums anymore without mutable-globals explicitly activated
Improved module-level export generation so these properly export all relevant nested elements, using the correct topmost name
Enabled the
@inline
decorator for constant variables (for example used forNaN
)Added
ERROR
,WARNING
andINFO
macros that emit a user-defined diagnostic when encounteredAdded experimental
gc.iterateRoots
builtin for potential use by a bundled GCFeel free to dig through the changeset and point out strange things. It's likely that something broke.