Skip to content

Commit

Permalink
chore(stdlib)!: Remove cons and empty from Pervasives (#1657)
Browse files Browse the repository at this point in the history
  • Loading branch information
phated authored Feb 6, 2023
1 parent 17cb28d commit f6f02bc
Show file tree
Hide file tree
Showing 219 changed files with 1,586 additions and 1,659 deletions.
8 changes: 4 additions & 4 deletions compiler/test/__snapshots__/arrays.0f9e7d37.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ arrays › array_access
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $decRef_0 (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$runtime/exception\" \"panicWithException\" (func $panicWithException_0 (param i32 i32) (result i32)))
(global $x_1116 (mut i32) (i32.const 0))
(global $x_1110 (mut i32) (i32.const 0))
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
Expand Down Expand Up @@ -44,7 +44,7 @@ arrays › array_access
(local.set $0
(block $compile_block.10 (result i32)
(block $compile_store.3
(global.set $x_1116
(global.set $x_1110
(tuple.extract 0
(tuple.make
(block $allocate_array.1 (result i32)
Expand Down Expand Up @@ -77,7 +77,7 @@ arrays › array_access
)
(call $decRef_0
(global.get $GRAIN$EXPORT$decRef_0)
(global.get $x_1116)
(global.get $x_1110)
)
)
)
Expand All @@ -90,7 +90,7 @@ arrays › array_access
(i32.const 1)
)
(local.set $2
(global.get $x_1116)
(global.get $x_1110)
)
(block $resolve_idx.8
(if
Expand Down
8 changes: 4 additions & 4 deletions compiler/test/__snapshots__/arrays.28fcc534.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ arrays › array_access4
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $decRef_0 (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$runtime/exception\" \"panicWithException\" (func $panicWithException_0 (param i32 i32) (result i32)))
(global $x_1116 (mut i32) (i32.const 0))
(global $x_1110 (mut i32) (i32.const 0))
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
Expand Down Expand Up @@ -44,7 +44,7 @@ arrays › array_access4
(local.set $0
(block $compile_block.10 (result i32)
(block $compile_store.3
(global.set $x_1116
(global.set $x_1110
(tuple.extract 0
(tuple.make
(block $allocate_array.1 (result i32)
Expand Down Expand Up @@ -77,7 +77,7 @@ arrays › array_access4
)
(call $decRef_0
(global.get $GRAIN$EXPORT$decRef_0)
(global.get $x_1116)
(global.get $x_1110)
)
)
)
Expand All @@ -90,7 +90,7 @@ arrays › array_access4
(i32.const -3)
)
(local.set $2
(global.get $x_1116)
(global.get $x_1110)
)
(block $resolve_idx.8
(if
Expand Down
8 changes: 4 additions & 4 deletions compiler/test/__snapshots__/arrays.4c8c9f91.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ arrays › array_access2
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $decRef_0 (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$runtime/exception\" \"panicWithException\" (func $panicWithException_0 (param i32 i32) (result i32)))
(global $x_1116 (mut i32) (i32.const 0))
(global $x_1110 (mut i32) (i32.const 0))
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
Expand Down Expand Up @@ -44,7 +44,7 @@ arrays › array_access2
(local.set $0
(block $compile_block.10 (result i32)
(block $compile_store.3
(global.set $x_1116
(global.set $x_1110
(tuple.extract 0
(tuple.make
(block $allocate_array.1 (result i32)
Expand Down Expand Up @@ -77,7 +77,7 @@ arrays › array_access2
)
(call $decRef_0
(global.get $GRAIN$EXPORT$decRef_0)
(global.get $x_1116)
(global.get $x_1110)
)
)
)
Expand All @@ -90,7 +90,7 @@ arrays › array_access2
(i32.const 3)
)
(local.set $2
(global.get $x_1116)
(global.get $x_1110)
)
(block $resolve_idx.8
(if
Expand Down
8 changes: 4 additions & 4 deletions compiler/test/__snapshots__/arrays.6eac4e1f.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ arrays › array_access3
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $decRef_0 (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$runtime/exception\" \"panicWithException\" (func $panicWithException_0 (param i32 i32) (result i32)))
(global $x_1116 (mut i32) (i32.const 0))
(global $x_1110 (mut i32) (i32.const 0))
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
Expand Down Expand Up @@ -44,7 +44,7 @@ arrays › array_access3
(local.set $0
(block $compile_block.10 (result i32)
(block $compile_store.3
(global.set $x_1116
(global.set $x_1110
(tuple.extract 0
(tuple.make
(block $allocate_array.1 (result i32)
Expand Down Expand Up @@ -77,7 +77,7 @@ arrays › array_access3
)
(call $decRef_0
(global.get $GRAIN$EXPORT$decRef_0)
(global.get $x_1116)
(global.get $x_1110)
)
)
)
Expand All @@ -90,7 +90,7 @@ arrays › array_access3
(i32.const 5)
)
(local.set $2
(global.get $x_1116)
(global.get $x_1110)
)
(block $resolve_idx.8
(if
Expand Down
8 changes: 4 additions & 4 deletions compiler/test/__snapshots__/arrays.74d79181.0.snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ arrays › array_access5
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $decRef_0 (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$runtime/exception\" \"panicWithException\" (func $panicWithException_0 (param i32 i32) (result i32)))
(global $x_1116 (mut i32) (i32.const 0))
(global $x_1110 (mut i32) (i32.const 0))
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
Expand Down Expand Up @@ -44,7 +44,7 @@ arrays › array_access5
(local.set $0
(block $compile_block.10 (result i32)
(block $compile_store.3
(global.set $x_1116
(global.set $x_1110
(tuple.extract 0
(tuple.make
(block $allocate_array.1 (result i32)
Expand Down Expand Up @@ -77,7 +77,7 @@ arrays › array_access5
)
(call $decRef_0
(global.get $GRAIN$EXPORT$decRef_0)
(global.get $x_1116)
(global.get $x_1110)
)
)
)
Expand All @@ -90,7 +90,7 @@ arrays › array_access5
(i32.const -5)
)
(local.set $2
(global.get $x_1116)
(global.get $x_1110)
)
(block $resolve_idx.8
(if
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ basic functionality › modulo4
(import \"_genv\" \"relocBase\" (global $relocBase_0 i32))
(import \"_genv\" \"moduleRuntimeId\" (global $moduleRuntimeId_0 i32))
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $GRAIN$EXPORT$incRef_0 (mut i32)))
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$%\" (global $%_1116 (mut i32)))
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$%\" (global $%_1110 (mut i32)))
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$pervasives\" \"%\" (func $%_1116 (param i32 i32 i32) (result i32)))
(import \"GRAIN$MODULE$pervasives\" \"%\" (func $%_1110 (param i32 i32 i32) (result i32)))
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
Expand Down Expand Up @@ -39,10 +39,10 @@ basic functionality › modulo4
(block $cleanup_locals.2 (result i32)
(local.set $0
(block $compile_block.1 (result i32)
(call $%_1116
(call $%_1110
(call $incRef_0
(global.get $GRAIN$EXPORT$incRef_0)
(global.get $%_1116)
(global.get $%_1110)
)
(i32.const -33)
(i32.const 35)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ basic functionality › land4
(import \"_genv\" \"relocBase\" (global $relocBase_0 i32))
(import \"_genv\" \"moduleRuntimeId\" (global $moduleRuntimeId_0 i32))
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $GRAIN$EXPORT$incRef_0 (mut i32)))
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$&\" (global $&_1116 (mut i32)))
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$&\" (global $&_1110 (mut i32)))
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$pervasives\" \"&\" (func $&_1116 (param i32 i32 i32) (result i32)))
(import \"GRAIN$MODULE$pervasives\" \"&\" (func $&_1110 (param i32 i32 i32) (result i32)))
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
Expand Down Expand Up @@ -39,10 +39,10 @@ basic functionality › land4
(block $cleanup_locals.2 (result i32)
(local.set $0
(block $compile_block.1 (result i32)
(call $&_1116
(call $&_1110
(call $incRef_0
(global.get $GRAIN$EXPORT$incRef_0)
(global.get $&_1116)
(global.get $&_1110)
)
(i32.const 1)
(i32.const 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ basic functionality › lxor1
(import \"_genv\" \"relocBase\" (global $relocBase_0 i32))
(import \"_genv\" \"moduleRuntimeId\" (global $moduleRuntimeId_0 i32))
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $GRAIN$EXPORT$incRef_0 (mut i32)))
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$^\" (global $^_1116 (mut i32)))
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$^\" (global $^_1110 (mut i32)))
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$pervasives\" \"^\" (func $^_1116 (param i32 i32 i32) (result i32)))
(import \"GRAIN$MODULE$pervasives\" \"^\" (func $^_1110 (param i32 i32 i32) (result i32)))
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
Expand Down Expand Up @@ -39,10 +39,10 @@ basic functionality › lxor1
(block $cleanup_locals.2 (result i32)
(local.set $0
(block $compile_block.1 (result i32)
(call $^_1116
(call $^_1110
(call $incRef_0
(global.get $GRAIN$EXPORT$incRef_0)
(global.get $^_1116)
(global.get $^_1110)
)
(i32.const 3)
(i32.const 3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ basic functionality › lor1
(import \"_genv\" \"relocBase\" (global $relocBase_0 i32))
(import \"_genv\" \"moduleRuntimeId\" (global $moduleRuntimeId_0 i32))
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $GRAIN$EXPORT$incRef_0 (mut i32)))
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$|\" (global $|_1116 (mut i32)))
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$|\" (global $|_1110 (mut i32)))
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$pervasives\" \"|\" (func $|_1116 (param i32 i32 i32) (result i32)))
(import \"GRAIN$MODULE$pervasives\" \"|\" (func $|_1110 (param i32 i32 i32) (result i32)))
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
Expand Down Expand Up @@ -39,10 +39,10 @@ basic functionality › lor1
(block $cleanup_locals.2 (result i32)
(local.set $0
(block $compile_block.1 (result i32)
(call $|_1116
(call $|_1110
(call $incRef_0
(global.get $GRAIN$EXPORT$incRef_0)
(global.get $|_1116)
(global.get $|_1110)
)
(i32.const 3)
(i32.const 3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ basic functionality › modulo6
(import \"_genv\" \"relocBase\" (global $relocBase_0 i32))
(import \"_genv\" \"moduleRuntimeId\" (global $moduleRuntimeId_0 i32))
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $GRAIN$EXPORT$incRef_0 (mut i32)))
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$%\" (global $%_1116 (mut i32)))
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$%\" (global $%_1110 (mut i32)))
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$pervasives\" \"%\" (func $%_1116 (param i32 i32 i32) (result i32)))
(import \"GRAIN$MODULE$pervasives\" \"%\" (func $%_1110 (param i32 i32 i32) (result i32)))
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
Expand Down Expand Up @@ -39,10 +39,10 @@ basic functionality › modulo6
(block $cleanup_locals.2 (result i32)
(local.set $0
(block $compile_block.1 (result i32)
(call $%_1116
(call $%_1110
(call $incRef_0
(global.get $GRAIN$EXPORT$incRef_0)
(global.get $%_1116)
(global.get $%_1110)
)
(i32.const 35)
(i32.const 35)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ basic functionality › precedence3
(import \"_genv\" \"moduleRuntimeId\" (global $moduleRuntimeId_0 i32))
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $GRAIN$EXPORT$incRef_0 (mut i32)))
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$decRef\" (global $GRAIN$EXPORT$decRef_0 (mut i32)))
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$%\" (global $%_1119 (mut i32)))
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$+\" (global $+_1116 (mut i32)))
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$%\" (global $%_1113 (mut i32)))
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$+\" (global $+_1110 (mut i32)))
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $decRef_0 (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$pervasives\" \"%\" (func $%_1119 (param i32 i32 i32) (result i32)))
(import \"GRAIN$MODULE$pervasives\" \"+\" (func $+_1116 (param i32 i32 i32) (result i32)))
(import \"GRAIN$MODULE$pervasives\" \"%\" (func $%_1113 (param i32 i32 i32) (result i32)))
(import \"GRAIN$MODULE$pervasives\" \"+\" (func $+_1110 (param i32 i32 i32) (result i32)))
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
Expand Down Expand Up @@ -48,10 +48,10 @@ basic functionality › precedence3
(local.set $6
(tuple.extract 0
(tuple.make
(call $%_1119
(call $%_1113
(call $incRef_0
(global.get $GRAIN$EXPORT$incRef_0)
(global.get $%_1119)
(global.get $%_1113)
)
(i32.const 9)
(i32.const 13)
Expand All @@ -66,10 +66,10 @@ basic functionality › precedence3
(block $do_backpatches.1
)
)
(call $+_1116
(call $+_1110
(call $incRef_0
(global.get $GRAIN$EXPORT$incRef_0)
(global.get $+_1116)
(global.get $+_1110)
)
(i32.const 7)
(call $incRef_0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ basic functionality › lsl1
(import \"_genv\" \"relocBase\" (global $relocBase_0 i32))
(import \"_genv\" \"moduleRuntimeId\" (global $moduleRuntimeId_0 i32))
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $GRAIN$EXPORT$incRef_0 (mut i32)))
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$<<\" (global $<<_1116 (mut i32)))
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$<<\" (global $<<_1110 (mut i32)))
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
(import \"GRAIN$MODULE$pervasives\" \"<<\" (func $<<_1116 (param i32 i32 i32) (result i32)))
(import \"GRAIN$MODULE$pervasives\" \"<<\" (func $<<_1110 (param i32 i32 i32) (result i32)))
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
(elem $elem (global.get $relocBase_0))
(export \"memory\" (memory $0))
Expand Down Expand Up @@ -39,10 +39,10 @@ basic functionality › lsl1
(block $cleanup_locals.2 (result i32)
(local.set $0
(block $compile_block.1 (result i32)
(call $<<_1116
(call $<<_1110
(call $incRef_0
(global.get $GRAIN$EXPORT$incRef_0)
(global.get $<<_1116)
(global.get $<<_1110)
)
(i32.const 15)
(i32.const 3)
Expand Down
Loading

0 comments on commit f6f02bc

Please sign in to comment.