summaryrefslogtreecommitdiffstats
path: root/byterun/fix_code.c
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2001-02-19 12:29:00 +0000
committerXavier Leroy <xavier.leroy@inria.fr>2001-02-19 12:29:00 +0000
commit4b84fcf843140a9a3f9ccd86036b7a314dcd216a (patch)
tree88884b36bb48f2683f027ce48ce25f5c261e55a3 /byterun/fix_code.c
parentf2a7fdbcd362c03edaa72a4631cab086161165d3 (diff)
Ajout du backtrace
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3422 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/fix_code.c')
-rw-r--r--byterun/fix_code.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/byterun/fix_code.c b/byterun/fix_code.c
index 5da63c62a..42df6333e 100644
--- a/byterun/fix_code.c
+++ b/byterun/fix_code.c
@@ -147,3 +147,11 @@ void set_instruction(code_t pos, opcode_t instr)
#endif
}
+int is_instruction(opcode_t instr1, opcode_t instr2)
+{
+#ifdef THREADED_CODE
+ return instr1 == (opcode_t)(instr_table[instr2] - instr_base);
+#else
+ return instr1 == instr2;
+#endif
+}