| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_STACK_FRAME_H_ | 5 #ifndef VM_STACK_FRAME_H_ |
| 6 #define VM_STACK_FRAME_H_ | 6 #define VM_STACK_FRAME_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/object.h" | 9 #include "vm/object.h" |
| 10 #include "vm/stub_code.h" | 10 #include "vm/stub_code.h" |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 return code_.raw(); | 329 return code_.raw(); |
| 330 } | 330 } |
| 331 | 331 |
| 332 intptr_t GetDeoptFpOffset() const; | 332 intptr_t GetDeoptFpOffset() const; |
| 333 | 333 |
| 334 private: | 334 private: |
| 335 void SetDone() { index_ = -1; } | 335 void SetDone() { index_ = -1; } |
| 336 | 336 |
| 337 intptr_t index_; | 337 intptr_t index_; |
| 338 intptr_t num_materializations_; | 338 intptr_t num_materializations_; |
| 339 intptr_t dest_frame_size_; |
| 339 Code& code_; | 340 Code& code_; |
| 340 TypedData& deopt_info_; | 341 TypedData& deopt_info_; |
| 341 Function& function_; | 342 Function& function_; |
| 342 uword pc_; | 343 uword pc_; |
| 343 GrowableArray<DeoptInstr*> deopt_instructions_; | 344 GrowableArray<DeoptInstr*> deopt_instructions_; |
| 344 ObjectPool& object_table_; | 345 ObjectPool& object_table_; |
| 345 | 346 |
| 346 DISALLOW_COPY_AND_ASSIGN(InlinedFunctionsIterator); | 347 DISALLOW_COPY_AND_ASSIGN(InlinedFunctionsIterator); |
| 347 }; | 348 }; |
| 348 | 349 |
| 350 |
| 349 #if !defined(TARGET_ARCH_DBC) | 351 #if !defined(TARGET_ARCH_DBC) |
| 350 DART_FORCE_INLINE static uword LocalVarAddress(uword fp, intptr_t index) { | 352 DART_FORCE_INLINE static intptr_t LocalVarIndex(intptr_t fp_offset, |
| 351 return fp + (index * kWordSize); | 353 intptr_t var_index) { |
| 354 return fp_offset + var_index; |
| 352 } | 355 } |
| 353 | 356 |
| 354 | 357 |
| 355 DART_FORCE_INLINE static uword ParamAddress(uword fp, intptr_t reverse_index) { | 358 DART_FORCE_INLINE static uword ParamAddress(uword fp, intptr_t reverse_index) { |
| 356 return fp + (kParamEndSlotFromFp * kWordSize) + (reverse_index * kWordSize); | 359 return fp + (kParamEndSlotFromFp * kWordSize) + (reverse_index * kWordSize); |
| 357 } | 360 } |
| 358 | 361 |
| 359 | 362 |
| 360 DART_FORCE_INLINE static bool IsCalleeFrameOf(uword fp, uword other_fp) { | 363 DART_FORCE_INLINE static bool IsCalleeFrameOf(uword fp, uword other_fp) { |
| 361 return other_fp < fp; | 364 return other_fp < fp; |
| 362 } | 365 } |
| 363 | 366 |
| 364 // Value for stack limit that is used to cause an interrupt. | 367 // Value for stack limit that is used to cause an interrupt. |
| 365 // Note that on DBC stack is growing upwards so interrupt limit is 0 unlike | 368 // Note that on DBC stack is growing upwards so interrupt limit is 0 unlike |
| 366 // on all other architectures. | 369 // on all other architectures. |
| 367 static const uword kInterruptStackLimit = ~static_cast<uword>(0); | 370 static const uword kInterruptStackLimit = ~static_cast<uword>(0); |
| 368 #endif | 371 #endif |
| 369 | 372 |
| 373 |
| 374 DART_FORCE_INLINE static uword LocalVarAddress(uword fp, intptr_t index) { |
| 375 return fp + LocalVarIndex(0, index) * kWordSize; |
| 376 } |
| 377 |
| 378 |
| 370 } // namespace dart | 379 } // namespace dart |
| 371 | 380 |
| 372 #endif // VM_STACK_FRAME_H_ | 381 #endif // VM_STACK_FRAME_H_ |
| OLD | NEW |