- Timestamp:
- Nov 23, 2011, 1:55:12 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Deliverables/D2.2/8051-indexed-labels-branch/src/LTL/LTLInterpret.ml
r1357 r1539 31 31 renv : hdw_reg_env ; 32 32 mem : memory ; 33 33 inds : CostLabel.const_indexing list ; 34 34 trace : CostLabel.t list } 35 35 … … 58 58 renv = I8051.RegisterMap.empty ; 59 59 mem = Mem.empty ; 60 60 inds = [] ; 61 61 trace = [] } 62 62 … … 102 102 let init_fun_call lbls_offs st ptr def = 103 103 let pc = entry_pc lbls_offs ptr def in 104 104 let st = new_ind st in 105 105 change_pc st pc 106 106 … … 204 204 change_pc st next_pc 205 205 206 let interpret_call lbls_offs st f ra = 207 let ptr = Mem.find_global st.mem f in 206 let interpret_call lbls_offs st ptr ra = 208 207 match Mem.find_fun_def st.mem ptr with 209 208 | LTL.F_int def -> … … 216 215 217 216 let interpret_return lbls_offs st = 218 217 let st = forget_ind st in 219 218 let (st, pc) = return_pc st in 220 219 change_pc st pc … … 237 236 238 237 | LTL.St_cost (cost_lbl, lbl) -> 239 238 let cost_lbl = ev_label st cost_lbl in 240 239 let st = add_trace st cost_lbl in 241 240 next_pc st lbl 242 241 243 242 | LTL.St_ind_0 (i, lbl) -> 244 245 243 enter_loop st i; 244 next_pc st lbl 246 245 247 246 | LTL.St_ind_inc (i, lbl) -> … … 249 248 next_pc st lbl 250 249 251 250 | LTL.St_int (r, i, lbl) -> 252 251 let st = add_reg r (Val.of_int i) st in 253 252 next_pc st lbl … … 321 320 322 321 | LTL.St_call_id (f, lbl) -> 323 interpret_call lbls_offs st f lbl 322 interpret_call lbls_offs st (Mem.find_global st.mem f) lbl 323 324 | LTL.St_call_ptr lbl -> 325 interpret_call lbls_offs st (dptr st) lbl 324 326 325 327 | LTL.St_condacc (lbl_true, lbl_false) ->
Note: See TracChangeset
for help on using the changeset viewer.