Commit 9c937dd9 authored by Kunshan Wang's avatar Kunshan Wang

Passes stack gc, big func and mem test.

parent dbc7e2a4
...@@ -50,7 +50,7 @@ class UvmInterpreterStackGCTests extends UvmBundleTesterBase { ...@@ -50,7 +50,7 @@ class UvmInterpreterStackGCTests extends UvmBundleTesterBase {
val func = ca.putFunction("@stackcollecttest") val func = ca.putFunction("@stackcollecttest")
testFunc(ca, func, Seq(nStacks)) { (ca, th, st, wp) => testFunc(ca, func, Seq(nStacks)) { (ca, th, st, wp) =>
nameOf(ca.currentInstruction(st, 0)) match { nameOf(ca.currentInstruction(st, 0)) match {
case "@stackcollecttest_v1.trap" => { case "@stackcollecttest_v1.endloop.trap" => {
gc() gc()
TrapRebindPassVoid(st) TrapRebindPassVoid(st)
} }
......
...@@ -41,15 +41,15 @@ class UvmInterpreterTestBigFunc extends UvmBundleTesterBase { ...@@ -41,15 +41,15 @@ class UvmInterpreterTestBigFunc extends UvmBundleTesterBase {
"The Micro VM" should "sustain frequent bundle loading" in { "The Micro VM" should "sustain frequent bundle loading" in {
val ca = microVM.newClientAgent() val ca = microVM.newClientAgent()
for(i <- 0 until 100) { for(i <- 0 until 1000) {
val miniBundle = s".global @h${i} <@i64>" val miniBundle = s".global @h${i} <@i64>"
ca.loadBundle(miniBundle) ca.loadBundle(miniBundle)
} }
val sb = new StringBuilder() val sb = new StringBuilder()
sb ++= ".funcdef @bigger VERSION @bigger.v1 <@big.sig> (%p) {\n" sb ++= ".funcdef @bigger VERSION @bigger.v1 <@big.sig> {\n"
sb ++= " %entry:\n" sb ++= " %entry(<@i64> %p):\n"
for(i <- 0 until 100) { for(i <- 0 until 1000) {
sb ++= s" %r${i} = STORE <@i64> @h${i} %p\n" sb ++= s" %r${i} = STORE <@i64> @h${i} %p\n"
} }
sb ++= " TRAP <@void>\n" sb ++= " TRAP <@void>\n"
......
...@@ -106,8 +106,8 @@ ...@@ -106,8 +106,8 @@
.funcsig @big.sig = @void (@i64) .funcsig @big.sig = @void (@i64)
.funcdef @big VERSION @big_v1 <@big.sig> (%p) { .funcdef @big VERSION @big_v1 <@big.sig> {
%entry: %entry(<@i64> %p):
%i0 = ADD <@i64> %p @I64_1 %i0 = ADD <@i64> %p @I64_1
%i1 = ADD <@i64> %i0 @I64_1 %i1 = ADD <@i64> %i0 @I64_1
%i2 = ADD <@i64> %i1 @I64_1 %i2 = ADD <@i64> %i1 @I64_1
......
...@@ -38,11 +38,11 @@ ...@@ -38,11 +38,11 @@
.typedef @iii8 = iref<@ii8> .typedef @iii8 = iref<@ii8>
.funcsig @sig1 = @i32 (@i32 @iii8) .funcsig @sig1 = @i32 (@i32 @iii8)
.typedef @f0 = func <@sig0> .typedef @f0 = funcref<@sig0>
.typedef @f1 = func <@sig1> .typedef @f1 = funcref<@sig1>
.typedef @th = thread .typedef @th = threadref
.typedef @st = stack .typedef @st = stackref
.typedef @tr64 = tagref64 .typedef @tr64 = tagref64
.typedef @i6 = int<6> .typedef @i6 = int<6>
...@@ -56,4 +56,4 @@ ...@@ -56,4 +56,4 @@
.funcdecl @fun <@sig0> .funcdecl @fun <@sig0>
.funcdecl @fun2 <@sig0> .funcdecl @fun2 <@sig0>
.const @NULLF0 <@f0> = NULL .const @NULLF0 <@f0> = NULL
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment