Skip to content

Commit

Permalink
snaps
Browse files Browse the repository at this point in the history
  • Loading branch information
ospencer committed Sep 30, 2023
1 parent ce340f7 commit 6e68d1b
Show file tree
Hide file tree
Showing 346 changed files with 1,222 additions and 825 deletions.
597 changes: 369 additions & 228 deletions compiler/esy.lock/index.json

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions compiler/src/codegen/compcore.re
Original file line number Diff line number Diff line change
Expand Up @@ -1511,6 +1511,7 @@ let allocate_byte_like_from_buffer = (wasm_mod, env, buf, tag, label) => {
),
Expression.Const.make(wasm_mod, const_int32(0)),
Expression.Const.make(wasm_mod, const_int32(data_size)),
grain_memory,
),
get_swap(),
],
Expand Down Expand Up @@ -3627,10 +3628,6 @@ let compile_wasm_module = (~env=?, ~name=?, prog) => {
);
validate_module(~name?, wasm_mod);

switch (Config.profile^) {
| Some(Release) => Optimize_mod.optimize(wasm_mod)
| None => ()
};
wasm_mod;
};

Expand Down
2 changes: 1 addition & 1 deletion compiler/test/__snapshots__/arrays.0f9e7d37.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ arrays › array_access
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/__snapshots__/arrays.1deb7b51.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ arrays › array_access5
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/__snapshots__/arrays.24453e6e.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ arrays › array1_trailing
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/__snapshots__/arrays.28fcc534.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ arrays › array_access4
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/__snapshots__/arrays.4c8c9f91.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ arrays › array_access2
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/__snapshots__/arrays.6eac4e1f.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ arrays › array_access3
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/__snapshots__/arrays.74d79181.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ arrays › array_access5
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/__snapshots__/arrays.9e17b4d1.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ arrays › array3
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
2 changes: 1 addition & 1 deletion compiler/test/__snapshots__/arrays.b85cb7fc.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ arrays › array1_trailing_space
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ basic functionality › binop2.4
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ basic functionality › neg
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ basic functionality › comp5
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ basic functionality › modulo4
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ basic functionality › land4
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ basic functionality › lxor1
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ basic functionality › lor1
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ basic functionality › modulo6
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ basic functionality › precedence1
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ basic functionality › comp16
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ basic functionality › comp3
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ basic functionality › orshadow
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ basic functionality › precedence2
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ basic functionality › precedence3
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ basic functionality › binop4
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ basic functionality › lsl1
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ basic functionality › unsafe_wasm_globals
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ basic functionality › comp22
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ basic functionality › land1
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ basic functionality › orshort2
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ basic functionality › simple_min
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ basic functionality › comp4
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(memory $0 0)
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
(export \"_gmain\" (func $_gmain))
(export \"_start\" (func $_start))
(export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE))
(export \"memory\" (memory $0))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
Expand Down
Loading

0 comments on commit 6e68d1b

Please sign in to comment.