Skip to content
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

chore(tests): Add basic testing for binop assignments #1939

Merged
merged 1 commit into from
Dec 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
basic functionality › assignment1
(module
(type $i32_i32_=>_i32 (func (param i32 i32) (result i32)))
(type $none_=>_i32 (func (result i32)))
(type $none_=>_none (func))
(type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32)))
(import \"_genv\" \"tbl\" (table $tbl 0 funcref))
(import \"_genv\" \"relocBase\" (global $relocBase_0 i32))
(import \"_genv\" \"moduleRuntimeId\" (global $moduleRuntimeId_0 i32))
(import \"_genv\" \"runtimeHeapStart\" (global $runtimeHeapStart_0 i32))
(import \"_genv\" \"runtimeHeapNextPtr\" (global $runtimeHeapNextPtr_0 (mut i32)))
(import \"_genv\" \"metadataPtr\" (global $metadataPtr_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 $*_1117 (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 $*_1117 (param i32 i32 i32) (result i32)))
(global $t_1113 (mut i32) (i32.const 0))
(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))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
(local $2 i32)
(local $3 i64)
(local $4 f32)
(local $5 f64)
(local $6 i32)
(block $compile_block.6 (result i32)
(block $compile_store.2
(global.set $t_1113
(i32.const 5)
)
(block $do_backpatches.1
)
)
(block $compile_store.4
(local.set $6
(call $*_1117
(call $incRef_0
(global.get $GRAIN$EXPORT$incRef_0)
(global.get $*_1117)
)
(call $incRef_0
(global.get $GRAIN$EXPORT$incRef_0)
(global.get $t_1113)
)
(i32.const 5)
)
)
(block $do_backpatches.3
)
)
(block $compile_set.5 (result i32)
(global.set $t_1113
(tuple.extract 0
(tuple.make
(call $incRef_0
(global.get $GRAIN$EXPORT$incRef_0)
(local.get $6)
)
(call $decRef_0
(global.get $GRAIN$EXPORT$decRef_0)
(global.get $t_1113)
)
)
)
)
(i32.const 1879048190)
)
)
)
(func $_start
(drop
(call $_gmain)
)
)
;; custom section \"cmi\", size 317
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
basic functionality › assignment1
(module
(type $i32_i32_=>_i32 (func (param i32 i32) (result i32)))
(type $none_=>_i32 (func (result i32)))
(type $none_=>_none (func))
(import \"_genv\" \"tbl\" (table $tbl 0 funcref))
(import \"_genv\" \"relocBase\" (global $relocBase_0 i32))
(import \"_genv\" \"moduleRuntimeId\" (global $moduleRuntimeId_0 i32))
(import \"_genv\" \"runtimeHeapStart\" (global $runtimeHeapStart_0 i32))
(import \"_genv\" \"runtimeHeapNextPtr\" (global $runtimeHeapNextPtr_0 (mut i32)))
(import \"_genv\" \"metadataPtr\" (global $metadataPtr_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$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)))
(global $t_1113 (mut i32) (i32.const 0))
(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))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
(local $2 i32)
(local $3 i64)
(local $4 f32)
(local $5 f64)
(block $compile_block.4 (result i32)
(block $compile_store.2
(global.set $t_1113
(i32.const 5)
)
(block $do_backpatches.1
)
)
(block $compile_set.3 (result i32)
(global.set $t_1113
(tuple.extract 0
(tuple.make
(call $incRef_0
(global.get $GRAIN$EXPORT$incRef_0)
(i32.const 3)
)
(call $decRef_0
(global.get $GRAIN$EXPORT$decRef_0)
(global.get $t_1113)
)
)
)
)
(i32.const 1879048190)
)
)
)
(func $_start
(drop
(call $_gmain)
)
)
;; custom section \"cmi\", size 317
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
basic functionality › assignment1
(module
(type $i32_i32_=>_i32 (func (param i32 i32) (result i32)))
(type $none_=>_i32 (func (result i32)))
(type $none_=>_none (func))
(type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32)))
(import \"_genv\" \"tbl\" (table $tbl 0 funcref))
(import \"_genv\" \"relocBase\" (global $relocBase_0 i32))
(import \"_genv\" \"moduleRuntimeId\" (global $moduleRuntimeId_0 i32))
(import \"_genv\" \"runtimeHeapStart\" (global $runtimeHeapStart_0 i32))
(import \"_genv\" \"runtimeHeapNextPtr\" (global $runtimeHeapNextPtr_0 (mut i32)))
(import \"_genv\" \"metadataPtr\" (global $metadataPtr_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 $+_1117 (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 $+_1117 (param i32 i32 i32) (result i32)))
(global $t_1113 (mut i32) (i32.const 0))
(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))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
(local $2 i32)
(local $3 i64)
(local $4 f32)
(local $5 f64)
(local $6 i32)
(block $compile_block.6 (result i32)
(block $compile_store.2
(global.set $t_1113
(i32.const 3)
)
(block $do_backpatches.1
)
)
(block $compile_store.4
(local.set $6
(call $+_1117
(call $incRef_0
(global.get $GRAIN$EXPORT$incRef_0)
(global.get $+_1117)
)
(call $incRef_0
(global.get $GRAIN$EXPORT$incRef_0)
(global.get $t_1113)
)
(i32.const 5)
)
)
(block $do_backpatches.3
)
)
(block $compile_set.5 (result i32)
(global.set $t_1113
(tuple.extract 0
(tuple.make
(call $incRef_0
(global.get $GRAIN$EXPORT$incRef_0)
(local.get $6)
)
(call $decRef_0
(global.get $GRAIN$EXPORT$decRef_0)
(global.get $t_1113)
)
)
)
)
(i32.const 1879048190)
)
)
)
(func $_start
(drop
(call $_gmain)
)
)
;; custom section \"cmi\", size 317
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
basic functionality › assignment1
(module
(type $i32_i32_=>_i32 (func (param i32 i32) (result i32)))
(type $none_=>_i32 (func (result i32)))
(type $none_=>_none (func))
(type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32)))
(import \"_genv\" \"tbl\" (table $tbl 0 funcref))
(import \"_genv\" \"relocBase\" (global $relocBase_0 i32))
(import \"_genv\" \"moduleRuntimeId\" (global $moduleRuntimeId_0 i32))
(import \"_genv\" \"runtimeHeapStart\" (global $runtimeHeapStart_0 i32))
(import \"_genv\" \"runtimeHeapNextPtr\" (global $runtimeHeapNextPtr_0 (mut i32)))
(import \"_genv\" \"metadataPtr\" (global $metadataPtr_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 $-_1117 (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 $-_1117 (param i32 i32 i32) (result i32)))
(global $t_1113 (mut i32) (i32.const 0))
(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))
(func $_gmain (result i32)
(local $0 i32)
(local $1 i32)
(local $2 i32)
(local $3 i64)
(local $4 f32)
(local $5 f64)
(local $6 i32)
(block $compile_block.6 (result i32)
(block $compile_store.2
(global.set $t_1113
(i32.const 5)
)
(block $do_backpatches.1
)
)
(block $compile_store.4
(local.set $6
(call $-_1117
(call $incRef_0
(global.get $GRAIN$EXPORT$incRef_0)
(global.get $-_1117)
)
(call $incRef_0
(global.get $GRAIN$EXPORT$incRef_0)
(global.get $t_1113)
)
(i32.const 5)
)
)
(block $do_backpatches.3
)
)
(block $compile_set.5 (result i32)
(global.set $t_1113
(tuple.extract 0
(tuple.make
(call $incRef_0
(global.get $GRAIN$EXPORT$incRef_0)
(local.get $6)
)
(call $decRef_0
(global.get $GRAIN$EXPORT$decRef_0)
(global.get $t_1113)
)
)
)
)
(i32.const 1879048190)
)
)
)
(func $_start
(drop
(call $_gmain)
)
)
;; custom section \"cmi\", size 317
)
Loading
Loading