From 3415badef847db518daa9b46c6274ac3fb89f56d Mon Sep 17 00:00:00 2001 From: bd-912 Date: Mon, 15 Apr 2024 22:30:43 -0600 Subject: HW3 Test runner script --- boil/tests/Factorial.vapor | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 boil/tests/Factorial.vapor (limited to 'boil/tests/Factorial.vapor') diff --git a/boil/tests/Factorial.vapor b/boil/tests/Factorial.vapor deleted file mode 100644 index 28e1126..0000000 --- a/boil/tests/Factorial.vapor +++ /dev/null @@ -1,30 +0,0 @@ - -const vmt_Fac - :Fac.ComputeFac - - -func Main() - t.0 = HeapAllocZ(4) - [t.0] = :vmt_Fac - if t.0 goto :null1 - Error("null pointer") - null1: - t.1 = [t.0] - t.1 = [t.1+0] - t.2 = call t.1(t.0 10) - PrintIntS(t.2) - ret - -func Fac.ComputeFac(this num) - t.0 = LtS(num 1) - if0 t.0 goto :if1_else - num_aux = 1 - goto :if1_end - if1_else: - t.1 = [this] - t.1 = [t.1+0] - t.2 = Sub(num 1) - t.3 = call t.1(this t.2) - num_aux = MulS(num t.3) - if1_end: - ret num_aux -- cgit v1.2.3