Skip to content

Commit

Permalink
Snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
ospencer committed Apr 15, 2022
1 parent 4b23540 commit 8902675
Show file tree
Hide file tree
Showing 54 changed files with 2,157 additions and 2,661 deletions.
48 changes: 19 additions & 29 deletions compiler/test/__snapshots__/basic_functionality.1d2ec323.0.snapshot
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
basic functionality › comp22
(module
(type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32)))
(type $i32_i32_=>_i32 (func (param i32 i32) (result i32)))
(type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32)))
(type $none_=>_i32 (func (result i32)))
(type $none_=>_none (func))
(import \"_grainEnv\" \"mem\" (memory $0 0))
(import \"_grainEnv\" \"tbl\" (table $tbl 0 funcref))
(import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32))
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$malloc (mut i32)))
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef (mut i32)))
Expand All @@ -16,6 +15,7 @@ basic functionality › comp22
(import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $wimport_GRAIN$MODULE$runtime/gc_malloc (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32)))
(import \"GRAIN$MODULE$pervasives\" \"isnt\" (func $gimport_pervasives_isnt (param i32 i32 i32) (result i32)))
(global $global_1 i32 (i32.const 0))
(export \"memory\" (memory $0))
Expand Down Expand Up @@ -45,7 +45,7 @@ basic functionality › comp22
(local.get $0)
(i32.const 3)
)
(local.set $2
(local.set $1
(tuple.extract 0
(tuple.make
(local.get $0)
Expand All @@ -56,27 +56,22 @@ basic functionality › comp22
)
)
)
(local.set $3
(local.set $2
(tuple.extract 0
(tuple.make
(call_indirect (type $i32_i32_i32_=>_i32)
(local.tee $0
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[...])
)
(call $gimport_pervasives_[...]
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[...])
)
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(local.get $2)
(local.get $1)
)
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[])
)
(i32.load offset=8
(local.get $0)
)
)
(call $wimport_GRAIN$MODULE$runtime/gc_decRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef)
Expand Down Expand Up @@ -113,15 +108,13 @@ basic functionality › comp22
)
)
)
(local.set $1
(local.set $3
(tuple.extract 0
(tuple.make
(call_indirect (type $i32_i32_i32_=>_i32)
(local.tee $1
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[...])
)
(call $gimport_pervasives_[...]
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[...])
)
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
Expand All @@ -131,9 +124,6 @@ basic functionality › comp22
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[])
)
(i32.load offset=8
(local.get $1)
)
)
(call $wimport_GRAIN$MODULE$runtime/gc_decRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef)
Expand All @@ -150,24 +140,24 @@ basic functionality › comp22
)
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(local.get $3)
(local.get $2)
)
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(local.get $1)
(local.get $3)
)
)
)
(drop
(call $wimport_GRAIN$MODULE$runtime/gc_decRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef)
(local.get $2)
(local.get $1)
)
)
(drop
(call $wimport_GRAIN$MODULE$runtime/gc_decRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef)
(local.get $3)
(local.get $2)
)
)
(drop
Expand All @@ -179,7 +169,7 @@ basic functionality › comp22
(drop
(call $wimport_GRAIN$MODULE$runtime/gc_decRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef)
(local.get $1)
(local.get $3)
)
)
(local.get $4)
Expand Down
56 changes: 18 additions & 38 deletions compiler/test/__snapshots__/basic_functionality.3c2ba165.0.snapshot
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
basic functionality › comp20
(module
(type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32)))
(type $i32_i32_=>_i32 (func (param i32 i32) (result i32)))
(type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32)))
(type $none_=>_i32 (func (result i32)))
(type $none_=>_none (func))
(import \"_grainEnv\" \"mem\" (memory $0 0))
(import \"_grainEnv\" \"tbl\" (table $tbl 0 funcref))
(import \"_grainEnv\" \"relocBase\" (global $wimport__grainEnv_relocBase i32))
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef (mut i32)))
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$decRef\" (global $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef (mut i32)))
Expand All @@ -14,6 +13,7 @@ basic functionality › comp20
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$isnt\" (global $gimport_pervasives_isnt (mut i32)))
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $wimport_GRAIN$MODULE$runtime/gc_incRef (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $wimport_GRAIN$MODULE$runtime/gc_decRef (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $gimport_pervasives_[...] (param i32 i32 i32) (result i32)))
(import \"GRAIN$MODULE$pervasives\" \"isnt\" (func $gimport_pervasives_isnt (param i32 i32 i32) (result i32)))
(global $global_1 i32 (i32.const 0))
(export \"memory\" (memory $0))
Expand All @@ -29,21 +29,16 @@ basic functionality › comp20
(local.set $0
(tuple.extract 0
(tuple.make
(call_indirect (type $i32_i32_i32_=>_i32)
(local.tee $0
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[...])
)
(call $gimport_pervasives_[...]
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[...])
)
(i32.const 5)
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[])
)
(i32.load offset=8
(local.get $0)
)
)
(call $wimport_GRAIN$MODULE$runtime/gc_decRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef)
Expand All @@ -55,21 +50,16 @@ basic functionality › comp20
(local.set $1
(tuple.extract 0
(tuple.make
(call_indirect (type $i32_i32_i32_=>_i32)
(local.tee $1
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[...])
)
(call $gimport_pervasives_[...]
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[...])
)
(i32.const 3)
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(local.get $0)
)
(i32.load offset=8
(local.get $1)
)
)
(call $wimport_GRAIN$MODULE$runtime/gc_decRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef)
Expand All @@ -81,21 +71,16 @@ basic functionality › comp20
(local.set $2
(tuple.extract 0
(tuple.make
(call_indirect (type $i32_i32_i32_=>_i32)
(local.tee $2
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[...])
)
(call $gimport_pervasives_[...]
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[...])
)
(i32.const 5)
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[])
)
(i32.load offset=8
(local.get $2)
)
)
(call $wimport_GRAIN$MODULE$runtime/gc_decRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef)
Expand All @@ -107,21 +92,16 @@ basic functionality › comp20
(local.set $3
(tuple.extract 0
(tuple.make
(call_indirect (type $i32_i32_i32_=>_i32)
(local.tee $3
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[...])
)
(call $gimport_pervasives_[...]
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[...])
)
(i32.const 3)
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(local.get $2)
)
(i32.load offset=8
(local.get $3)
)
)
(call $wimport_GRAIN$MODULE$runtime/gc_decRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef)
Expand Down
Loading

0 comments on commit 8902675

Please sign in to comment.