diff options
Diffstat (limited to 'src/boot/be/il.ml')
| -rw-r--r-- | src/boot/be/il.ml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/boot/be/il.ml b/src/boot/be/il.ml index 792e83e2..2a5b643a 100644 --- a/src/boot/be/il.ml +++ b/src/boot/be/il.ml @@ -695,7 +695,7 @@ type emitter = { mutable emit_pc: int; emit_target_specific: (emitter -> quad -> unit); mutable emit_quads: quads; emit_annotations: (int,string) Hashtbl.t; - emit_size_cache: ((size,operand) Hashtbl.t) Stack.t; + emit_size_cache: (size,operand) Hashtbl.t; emit_node: node_id option; } @@ -722,7 +722,7 @@ let new_emitter emit_target_specific = emit_target_specific; emit_quads = Array.create 4 badq; emit_annotations = Hashtbl.create 0; - emit_size_cache = Stack.create (); + emit_size_cache = Hashtbl.create 0; emit_node = node; } ;; @@ -901,6 +901,13 @@ let get_element_ptr (string_of_cell fmt mem_cell) ;; +let ptr_cast (cell:cell) (rty:referent_ty) : cell = + match cell with + Mem (mem, _) -> Mem (mem, rty) + | Reg (reg, AddrTy _) -> Reg (reg, AddrTy rty) + | _ -> bug () "expected address cell in Il.ptr_cast" +;; + (* * Local Variables: * fill-column: 78; |