summaryrefslogtreecommitdiff
path: root/src/bytecode_util.ml
diff options
context:
space:
mode:
authorAlasdair Armstrong2018-08-14 18:24:32 +0100
committerAlasdair Armstrong2018-08-14 18:24:32 +0100
commit7adf0f81af82f3d401a9b45f87c1dc92c5062f8e (patch)
tree3135864d49a1efd20a16a4cdedd6412dc84b9c80 /src/bytecode_util.ml
parent8dd787cab934e0b608093d0d3a2a4e8bd6e8f5a0 (diff)
Improve error messages from C backend, and fix issues with assigning to pointers
Diffstat (limited to 'src/bytecode_util.ml')
-rw-r--r--src/bytecode_util.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bytecode_util.ml b/src/bytecode_util.ml
index c612660a..3e674cfd 100644
--- a/src/bytecode_util.ml
+++ b/src/bytecode_util.ml
@@ -79,7 +79,7 @@ let ifuncall ?loc:(l=Parse_ast.Unknown) clexp id cvals =
let iextern ?loc:(l=Parse_ast.Unknown) clexp id cvals =
I_aux (I_funcall (clexp, true, id, cvals), (instr_number (), l))
-let icopy ?loc:(l=Parse_ast.Unknown) clexp cval =
+let icopy l clexp cval =
I_aux (I_copy (clexp, cval), (instr_number (), l))
let iclear ?loc:(l=Parse_ast.Unknown) ctyp id =
@@ -267,7 +267,7 @@ let rec ctyp_ids = function
| CT_vector (_, ctyp) | CT_list ctyp | CT_ref ctyp -> ctyp_ids ctyp
| CT_int | CT_int64 | CT_bits _ | CT_bits64 _ | CT_unit
| CT_bool | CT_real | CT_bit | CT_string | CT_poly -> IdSet.empty
-
+
let rec unpoly = function
| F_poly f -> unpoly f
| F_call (call, fs) -> F_call (call, List.map unpoly fs)