Skip to content

Rework resolver #489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Feb 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
882fb2b
Rework resolver
dcodeIO Feb 15, 2019
7f10afb
more symbol preparation
dcodeIO Feb 15, 2019
050d3b2
type IR
dcodeIO Feb 17, 2019
da400c5
merge with tests
dcodeIO Feb 17, 2019
22c0275
compile files not sources, account for export *, first few tests
dcodeIO Feb 18, 2019
94fa819
get rid of inefficient source lookup
dcodeIO Feb 18, 2019
a638d0e
refactor flow to its own file
dcodeIO Feb 18, 2019
12e7cf3
initial @lazy, remove tree shaking
dcodeIO Feb 18, 2019
396f6f7
switch flow when compiling a lazy global, checked more tests
dcodeIO Feb 19, 2019
8667484
explicitly annotated start function, more test review
dcodeIO Feb 19, 2019
9eeb5ae
const enums like tsc, more test review
dcodeIO Feb 19, 2019
fddcaee
less nops = less empty start functions, more lazy, more test review
dcodeIO Feb 19, 2019
adbe7c1
fix
dcodeIO Feb 19, 2019
114b558
complete tests
dcodeIO Feb 19, 2019
ed39081
fix export { memory }
dcodeIO Feb 19, 2019
46cdc82
clean up a bit
dcodeIO Feb 19, 2019
31d5450
nested type names, addresses #423 and #127
dcodeIO Feb 19, 2019
f585289
more resolve-nested cases
dcodeIO Feb 19, 2019
ff5ef1e
resolve-nested from upper scope
dcodeIO Feb 19, 2019
5c0e101
lead by example and make a proper resolver-nested test
dcodeIO Feb 19, 2019
0b7240a
program cleanup
dcodeIO Feb 20, 2019
05d6996
clean up resolver
dcodeIO Feb 20, 2019
87f0b82
slim down AST
dcodeIO Feb 20, 2019
d60065b
bump version
dcodeIO Feb 20, 2019
029b119
program docs
dcodeIO Feb 20, 2019
de8416e
refactor resolver big switch
dcodeIO Feb 20, 2019
7e22f70
update examples
dcodeIO Feb 20, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 0 additions & 1 deletion cli/asc.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,6 @@ 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.setImportTable(compilerOptions, args.importTable);
Expand Down
5 changes: 0 additions & 5 deletions cli/asc.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,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 Down
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