mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-07-02 16:11:49 +00:00
Add support for the 'mutable-global' proposal behind a feature flag
This commit is contained in:
@ -379,8 +379,8 @@ exports.main = function main(argv, options, callback) {
|
||||
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.toUpperCase()];
|
||||
if (!flag) return callback(Error("Feature '" + name + "' is invalid."));
|
||||
let flag = assemblyscript["FEATURE_" + name.replace(/\-/g, "_").toUpperCase()];
|
||||
if (!flag) return callback(Error("Feature '" + name + "' is unknown."));
|
||||
assemblyscript.enableFeature(compilerOptions, flag);
|
||||
}
|
||||
}
|
||||
|
@ -150,7 +150,13 @@
|
||||
"type": "string"
|
||||
},
|
||||
"feature": {
|
||||
"desc": "Enables additional (experimental) WebAssembly features.",
|
||||
"desc": [
|
||||
"Enables additional (experimental) WebAssembly features.",
|
||||
"",
|
||||
" sign-extension Enables sign-extension operations",
|
||||
" mutable-global Enables mutable global imports and exports",
|
||||
""
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"measure": {
|
||||
|
Reference in New Issue
Block a user