Initial implementation of 'new'

This doesn't yet call the constructor or use provided parameters and just allocates raw memory
This commit is contained in:
dcodeIO
2018-01-19 16:13:14 +01:00
parent ef7a095494
commit 64c939fdc4
12 changed files with 206 additions and 50 deletions

View File

@ -84,7 +84,14 @@ glob.sync(filter, { cwd: __dirname + "/compiler" }).forEach(filename => {
externalFunc: function(arg0, arg1, arg2) {
console.log("env.externalFunc called with: " + arg0 + ", " + arg1 + ", " + arg2);
},
externalConst: 1
externalConst: 1,
allocate_memory: function(size) {
console.log("env.allocate_memory called with: " + size);
return 0;
},
free_memory: function(ptr) {
console.log("env.free_memory called with: " + ptr);
}
},
external: {
externalFunc: function(arg0, arg1, arg2) {