diff options
| author | Roy Frostig <[email protected]> | 2010-08-09 15:45:08 -0700 |
|---|---|---|
| committer | Roy Frostig <[email protected]> | 2010-08-09 15:45:08 -0700 |
| commit | 982dcc29bf6cd41e967a0befe0c6195811cd6a55 (patch) | |
| tree | 5973524a65f4a2095b75b63c8d72b2b3804ddd6a /src/boot/be/il.ml | |
| parent | XFailed some tests. (diff) | |
| download | rust-982dcc29bf6cd41e967a0befe0c6195811cd6a55.tar.xz rust-982dcc29bf6cd41e967a0befe0c6195811cd6a55.zip | |
Get object's captured typarams when calculating sizes in the backend's fn-prologue-generation for object methods.
Diffstat (limited to 'src/boot/be/il.ml')
| -rw-r--r-- | src/boot/be/il.ml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/boot/be/il.ml b/src/boot/be/il.ml index 172d8661..2a5b643a 100644 --- a/src/boot/be/il.ml +++ b/src/boot/be/il.ml @@ -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; |