Revision 66359a5e
Added by Pierre-Loïc Garoche about 7 years ago
src/optimize_machine.ml | ||
---|---|---|
261 | 261 |
|
262 | 262 |
let instr_of_const top_const = |
263 | 263 |
let const = const_of_top top_const in |
264 |
let vdecl = mkvar_decl Location.dummy_loc (const.const_id, mktyp Location.dummy_loc Tydec_any, mkclock Location.dummy_loc Ckdec_any, true, None) in |
|
264 |
let vdecl = mkvar_decl Location.dummy_loc (const.const_id, mktyp Location.dummy_loc Tydec_any, mkclock Location.dummy_loc Ckdec_any, true, None, None) in
|
|
265 | 265 |
let vdecl = { vdecl with var_type = const.const_type } |
266 | 266 |
in mkinstr (MLocalAssign (vdecl, mk_val (Cst const.const_value) vdecl.var_type)) |
267 | 267 |
|
Also available in: Unified diff
[general] large modification: added machine types, a second typing phase dealing with machine types (eg uint8)
typing was transformed as a functor and parametrized by basic types (int/real/bool)
it can also be applied multiple times on the same program