Skip to content

Update to latest Binaryen & introduce anyref #800

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

Merged
merged 10 commits into from
Sep 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ jobs:
- npm run clean && npm run test:compiler rt/flags threads
env:
- Runs experimental tests on node.js v8-canary using
- ASC_FEATURES="simd,threads"
- ASC_FEATURES="mutable-globals,simd,threads,reference-types,bigint-integration"
- NVM_NODEJS_ORG_MIRROR="https://nodejs.org/download/v8-canary/"
17 changes: 14 additions & 3 deletions cli/asc.js
Original file line number Diff line number Diff line change
Expand Up @@ -572,9 +572,20 @@ exports.main = function main(argv, options, callback) {
}
}

// Enable additional features if specified
var features = args.enable;
if (features != null) {
// Disable default features if specified
var features;
if ((features = args.disable) != null) {
if (typeof features === "string") features = features.split(",");
for (let i = 0, k = features.length; i < k; ++i) {
let name = features[i].trim();
let flag = assemblyscript["FEATURE_" + name.replace(/\-/g, "_").toUpperCase()];
if (!flag) return callback(Error("Feature '" + name + "' is unknown."));
assemblyscript.disableFeature(compilerOptions, flag);
}
}

// Enable experimental features if specified
if ((features = args.enable) != null) {
if (typeof features === "string") features = features.split(",");
for (let i = 0, k = features.length; i < k; ++i) {
let name = features[i].trim();
Expand Down
25 changes: 19 additions & 6 deletions cli/asc.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,17 +186,30 @@
},
"enable": {
"description": [
"Enables additional (experimental) WebAssembly features.",
"Enables WebAssembly features that are disabled by default.",
"",
" sign-extension Enables sign-extension operations",
" mutable-global Enables mutable global imports and exports",
" bulk-memory Enables bulk memory operations",
" simd Enables SIMD types and operations.",
" threads Enables threading and atomic operations.",
" sign-extension Sign-extension operations",
" bulk-memory Bulk memory operations.",
" simd SIMD types and operations.",
" threads Threading and atomic operations.",
" reference-types Reference types and operations.",
""
],
"TODO_doesNothingYet": [
" nontrapping-f2i Non-trapping float to integer ops.",
" exception-handling Exception handling.",
" tail-calls Tail call operations."
],
"type": "s"
},
"disable": {
"description": [
"Disables WebAssembly features that are enabled by default.",
"",
" mutable-globals Mutable global imports and exports.",
""
]
},
"transform": {
"description": "Specifies the path to a custom transform to 'require'.",
"type": "S"
Expand Down
Loading