Skip to content

Commit

Permalink
Merge pull request AssemblyScript#19 from nearprotocol/assemblyscript…
Browse files Browse the repository at this point in the history
…-update

Update AssemblyScript to latest upstream
  • Loading branch information
vgrichina committed Feb 21, 2019
2 parents f1b96cf + ef0d82f commit 704e67f
Show file tree
Hide file tree
Showing 244 changed files with 19,979 additions and 40,679 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
cd $TRAVIS_BUILD_DIR/tests/allocators/buddy && npm run build && cd .. && npm test buddy &&
cd $TRAVIS_BUILD_DIR/tests/allocators/tlsf && npm run build && cd .. && npm test tlsf;
fi
env: Runs the tests on node.js LTS
env: Runs the tests on node.js LTS, also tests allocators
- node_js: node
script:
- npm run all
Expand Down
2 changes: 1 addition & 1 deletion cli/asc.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,9 @@ exports.main = function main(argv, options, callback) {
// Begin compilation
const compilerOptions = assemblyscript.createOptions();
assemblyscript.setTarget(compilerOptions, 0);
assemblyscript.setNoTreeShaking(compilerOptions, args.noTreeShaking);
assemblyscript.setNoAssert(compilerOptions, args.noAssert);
assemblyscript.setImportMemory(compilerOptions, args.importMemory);
assemblyscript.setSharedMemory(compilerOptions, args.sharedMemory);
assemblyscript.setImportTable(compilerOptions, args.importTable);
assemblyscript.setMemoryBase(compilerOptions, args.memoryBase >>> 0);
assemblyscript.setSourceMap(compilerOptions, args.sourceMap != null);
Expand Down
10 changes: 5 additions & 5 deletions cli/asc.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@
"type": "b",
"default": false
},
"noTreeShaking": {
"description": "Disables compiler-level tree-shaking, compiling everything.",
"type": "b",
"default": false
},
"noAssert": {
"description": "Replaces assertions with just their value without trapping.",
"type": "b",
Expand All @@ -110,6 +105,11 @@
"type": "b",
"default": false
},
"sharedMemory": {
"description": "Declare memory as shared by settings the max shared memory.",
"type": "i",
"default": 0
},
"memoryBase": {
"description": "Sets the start offset of compiler-generated static memory.",
"type": "i",
Expand Down
2 changes: 1 addition & 1 deletion dist/asc.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/asc.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/assemblyscript.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/assemblyscript.js.map

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions examples/game-of-life/build/optimized.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,17 @@ declare module ASModule {
type f32 = number;
type f64 = number;
type bool = any;
namespace JSMath {
function random(): f64;
}
var w: i32;
var h: i32;
var s: i32;
function init(width: i32, height: i32): void;
function step(): void;
function fill(x: u32, y: u32, p: f64): void;
var BGR_ALIVE: u32;
var BGR_DEAD: u32;
var BIT_ROT: u32;
}
export default ASModule;
Binary file modified examples/game-of-life/build/optimized.wasm
Binary file not shown.
Loading

0 comments on commit 704e67f

Please sign in to comment.