mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-16 16:31:32 +00:00
Add a mechanism to enable additional (experimental) features and start with sign extension operations; Hashing experimentation
This commit is contained in:
12
bin/asc.js
12
bin/asc.js
@ -373,6 +373,18 @@ exports.main = function main(argv, options, callback) {
|
||||
}
|
||||
}
|
||||
|
||||
// Enable additional features if specified
|
||||
var features = args.feature;
|
||||
if (features != 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.toUpperCase()];
|
||||
if (!flag) return callback(Error("Feature '" + name + "' is invalid."));
|
||||
assemblyscript.enableFeature(compilerOptions, flag);
|
||||
}
|
||||
}
|
||||
|
||||
var module;
|
||||
stats.compileCount++;
|
||||
(() => {
|
||||
|
Reference in New Issue
Block a user