Skip to content

Commit

Permalink
snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
ospencer committed Apr 8, 2022
1 parent 8f37c69 commit 0c03f16
Show file tree
Hide file tree
Showing 54 changed files with 2,649 additions and 3,444 deletions.
40 changes: 10 additions & 30 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 @@ -64,17 +64,10 @@ basic functionality › comp22
(local.set $2
(tuple.extract 0
(tuple.make
(call_indirect (type $i32_i32_i32_=>_i32)
(local.tee $0
(tuple.extract 0
(tuple.make
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[...])
)
(local.get $0)
)
)
(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 @@ -84,9 +77,6 @@ basic functionality › comp22
(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 @@ -131,17 +121,10 @@ basic functionality › comp22
(local.set $4
(tuple.extract 0
(tuple.make
(call_indirect (type $i32_i32_i32_=>_i32)
(local.tee $0
(tuple.extract 0
(tuple.make
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[...])
)
(local.get $0)
)
)
(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 @@ -151,9 +134,6 @@ basic functionality › comp22
(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
104 changes: 32 additions & 72 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 @@ -26,29 +26,19 @@ basic functionality › comp20
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local.set $1
(local.set $0
(tuple.extract 0
(tuple.make
(call_indirect (type $i32_i32_i32_=>_i32)
(local.tee $0
(tuple.extract 0
(tuple.make
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[...])
)
(i32.const 0)
)
)
(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 @@ -57,27 +47,17 @@ basic functionality › comp20
)
)
)
(local.set $2
(local.set $1
(tuple.extract 0
(tuple.make
(call_indirect (type $i32_i32_i32_=>_i32)
(local.tee $0
(tuple.extract 0
(tuple.make
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[...])
)
(local.get $0)
)
)
(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 $1)
)
(i32.load offset=8
(local.get $0)
)
)
Expand All @@ -88,29 +68,19 @@ basic functionality › comp20
)
)
)
(local.set $3
(local.set $2
(tuple.extract 0
(tuple.make
(call_indirect (type $i32_i32_i32_=>_i32)
(local.tee $0
(tuple.extract 0
(tuple.make
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[...])
)
(local.get $0)
)
)
(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 @@ -119,28 +89,18 @@ basic functionality › comp20
)
)
)
(local.set $4
(local.set $3
(tuple.extract 0
(tuple.make
(call_indirect (type $i32_i32_i32_=>_i32)
(local.tee $0
(tuple.extract 0
(tuple.make
(call $wimport_GRAIN$MODULE$runtime/gc_incRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$incRef)
(global.get $gimport_pervasives_[...])
)
(local.get $0)
)
)
(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 $3)
)
(i32.load offset=8
(local.get $0)
(local.get $2)
)
)
(call $wimport_GRAIN$MODULE$runtime/gc_decRef
Expand All @@ -150,7 +110,7 @@ basic functionality › comp20
)
)
)
(local.set $0
(local.set $4
(tuple.extract 0
(tuple.make
(call $gimport_pervasives_isnt
Expand All @@ -160,42 +120,42 @@ basic functionality › comp20
)
(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)
(local.get $4)
(local.get $3)
)
)
(local.get $0)
(i32.const 0)
)
)
)
(drop
(call $wimport_GRAIN$MODULE$runtime/gc_decRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef)
(local.get $1)
(local.get $0)
)
)
(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
(call $wimport_GRAIN$MODULE$runtime/gc_decRef
(global.get $wimport_GRAIN$MODULE$runtime/gc_GRAIN$EXPORT$decRef)
(local.get $4)
(local.get $3)
)
)
(local.get $0)
(local.get $4)
)
(func $_start (; has Stack IR ;)
(drop
Expand Down
Loading

0 comments on commit 0c03f16

Please sign in to comment.