core/vm, tests: implemented semi-jit vm

* changed stack and removed stack ptr. Let go decide on slice reuse.
This commit is contained in:
Jeffrey Wilcke
2015-07-17 23:09:36 +02:00
parent 698e98d981
commit 846f34f78b
19 changed files with 1572 additions and 79 deletions

View File

@ -21,6 +21,20 @@ import (
"testing"
)
func BenchmarkVmAckermann32Tests(b *testing.B) {
fn := filepath.Join(vmTestDir, "vmPerformanceTest.json")
if err := BenchVmTest(fn, bconf{"ackermann32", true, false}, b); err != nil {
b.Error(err)
}
}
func BenchmarkVmFibonacci16Tests(b *testing.B) {
fn := filepath.Join(vmTestDir, "vmPerformanceTest.json")
if err := BenchVmTest(fn, bconf{"fibonacci16", true, true}, b); err != nil {
b.Error(err)
}
}
// I've created a new function for each tests so it's easier to identify where the problem lies if any of them fail.
func TestVMArithmetic(t *testing.T) {
fn := filepath.Join(vmTestDir, "vmArithmeticTest.json")