@@ -1143,10 +1143,11 @@ where
1143
1143
/// Emits a series of instructions that load the `fuel_consumed` field from
1144
1144
/// `VMStoreContext`.
1145
1145
fn emit_load_fuel_consumed ( & mut self , fuel_reg : Reg ) -> Result < ( ) > {
1146
- let limits_offset = self . env . vmoffsets . ptr . vmctx_runtime_limits ( ) ;
1146
+ let store_context_offset = self . env . vmoffsets . ptr . vmctx_store_context ( ) ;
1147
1147
let fuel_offset = self . env . vmoffsets . ptr . vmstore_context_fuel_consumed ( ) ;
1148
1148
self . masm . load_ptr (
1149
- self . masm . address_at_vmctx ( u32:: from ( limits_offset) ) ?,
1149
+ self . masm
1150
+ . address_at_vmctx ( u32:: from ( store_context_offset) ) ?,
1150
1151
writable ! ( fuel_reg) ,
1151
1152
) ?;
1152
1153
@@ -1221,7 +1222,7 @@ where
1221
1222
epoch_counter_reg : Reg ,
1222
1223
) -> Result < ( ) > {
1223
1224
let epoch_ptr_offset = self . env . vmoffsets . ptr . vmctx_epoch_ptr ( ) ;
1224
- let runtime_limits_offset = self . env . vmoffsets . ptr . vmctx_runtime_limits ( ) ;
1225
+ let store_context_offset = self . env . vmoffsets . ptr . vmctx_store_context ( ) ;
1225
1226
let epoch_deadline_offset = self . env . vmoffsets . ptr . vmstore_context_epoch_deadline ( ) ;
1226
1227
1227
1228
// Load the current epoch value into `epoch_counter_var`.
@@ -1241,7 +1242,7 @@ where
1241
1242
// Load the `VMStoreContext`.
1242
1243
self . masm . load_ptr (
1243
1244
self . masm
1244
- . address_at_vmctx ( u32:: from ( runtime_limits_offset ) ) ?,
1245
+ . address_at_vmctx ( u32:: from ( store_context_offset ) ) ?,
1245
1246
writable ! ( epoch_deadline_reg) ,
1246
1247
) ?;
1247
1248
@@ -1262,13 +1263,14 @@ where
1262
1263
return Ok ( ( ) ) ;
1263
1264
}
1264
1265
1265
- let limits_offset = self . env . vmoffsets . ptr . vmctx_runtime_limits ( ) ;
1266
+ let store_context_offset = self . env . vmoffsets . ptr . vmctx_store_context ( ) ;
1266
1267
let fuel_offset = self . env . vmoffsets . ptr . vmstore_context_fuel_consumed ( ) ;
1267
1268
let limits_reg = self . context . any_gpr ( self . masm ) ?;
1268
1269
1269
1270
// Load `VMStoreContext` into the `limits_reg` reg.
1270
1271
self . masm . load_ptr (
1271
- self . masm . address_at_vmctx ( u32:: from ( limits_offset) ) ?,
1272
+ self . masm
1273
+ . address_at_vmctx ( u32:: from ( store_context_offset) ) ?,
1272
1274
writable ! ( limits_reg) ,
1273
1275
) ?;
1274
1276
0 commit comments