aboutsummaryrefslogtreecommitdiff
path: root/src/instptr.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/instptr.ml')
-rw-r--r--src/instptr.ml9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/instptr.ml b/src/instptr.ml
index 0311a00..9006b66 100644
--- a/src/instptr.ml
+++ b/src/instptr.ml
@@ -25,10 +25,10 @@ let instptr_get = function
25 25
26let instptr_string instptr = 26let instptr_string instptr =
27 let string_of_inst = function 27 let string_of_inst = function
28 | Zero(a) -> "Zero " ^ (string_of_int a) 28 | URMZero(a) -> "URMZero " ^ (string_of_int a)
29 | Succ(a) -> "Succ " ^ (string_of_int a) 29 | URMSucc(a) -> "URMSucc " ^ (string_of_int a)
30 | Copy(a, b) -> "Copy " ^ (string_of_int a) ^ " " ^ (string_of_int b) 30 | URMCopy(a, b) -> "URMCopy " ^ (string_of_int a) ^ " " ^ (string_of_int b)
31 | Jump(a, b, c) -> "Jump " ^ (string_of_int a) ^ " " ^ (string_of_int b) ^ " " ^ (string_of_int c) 31 | URMJump(a, b, c) -> "URMJump " ^ (string_of_int a) ^ " " ^ (string_of_int b) ^ " " ^ (string_of_int c)
32 in let string_of_instptr (l, inst) = (string_of_int l) ^ ": " ^ string_of_inst inst 32 in let string_of_instptr (l, inst) = (string_of_int l) ^ ": " ^ string_of_inst inst
33 in try string_of_instptr (instptr_get instptr) with _ -> "null" 33 in try string_of_instptr (instptr_get instptr) with _ -> "null"
34 34
@@ -40,4 +40,3 @@ let rec instptr_jump ptr offset = match offset with
40 | 0 -> ptr 40 | 0 -> ptr
41 | _ when offset > 0 -> instptr_jump (instptr_move_up ptr) (offset - 1) 41 | _ when offset > 0 -> instptr_jump (instptr_move_up ptr) (offset - 1)
42 | _ -> instptr_jump (instptr_move_down ptr) (offset + 1) 42 | _ -> instptr_jump (instptr_move_down ptr) (offset + 1)
43