Initial external decorator for annotating explicit import names; Use file name as default module name in imports; Emit empty memory if there are no static segments; Update TLSF and examples accordingly

This commit is contained in:
dcodeIO
2018-06-28 01:44:32 +02:00
parent 27e61f8f67
commit 9c16363796
110 changed files with 17069 additions and 16757 deletions

View File

@ -151,14 +151,31 @@ tests.forEach(filename => {
logi: function(i) { console.log("logi: " + i); },
logf: function(f) { console.log("logf: " + f); }
},
JSOp: {
mod: function(a, b) { return a % b; }
},
JSMath: Math,
// tests/declare
declare: {
externalFunction: function() { },
externalConstant: 1
},
my: {
externalFunction: function() { },
externalConstant: 2
},
JSOp: {
mod: function(a, b) { return a % b; }
// tests/external
external: {
foo: function() {},
bar: function() {}
},
foo: {
bar: function() {},
baz: function() {},
"var": 3
},
JSMath: Math
});
});
console.log("- " + colors.green("instantiate OK") + " (" + asc.formatTime(runTime) + ")");