Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: runtime/vm/stack_frame.h

Issue 2176413003: DBC: Fix reading locals out of a deopt frame. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
349 #if !defined(TARGET_ARCH_DBC) 350 #if !defined(TARGET_ARCH_DBC)
350 DART_FORCE_INLINE static uword LocalVarAddress(uword fp, intptr_t index) { 351 DART_FORCE_INLINE static uword LocalVarAddress(uword fp, intptr_t index) {
351 return fp + (index * kWordSize); 352 return fp + (index * kWordSize);
352 } 353 }
353 354
354 355
356 DART_FORCE_INLINE static intptr_t LocalVarIndex(intptr_t fp_offset,
357 intptr_t var_index) {
358 return fp_offset + var_index;
359 }
360
361
355 DART_FORCE_INLINE static uword ParamAddress(uword fp, intptr_t reverse_index) { 362 DART_FORCE_INLINE static uword ParamAddress(uword fp, intptr_t reverse_index) {
356 return fp + (kParamEndSlotFromFp * kWordSize) + (reverse_index * kWordSize); 363 return fp + (kParamEndSlotFromFp * kWordSize) + (reverse_index * kWordSize);
357 } 364 }
358 365
359 366
360 DART_FORCE_INLINE static bool IsCalleeFrameOf(uword fp, uword other_fp) { 367 DART_FORCE_INLINE static bool IsCalleeFrameOf(uword fp, uword other_fp) {
361 return other_fp < fp; 368 return other_fp < fp;
362 } 369 }
363 370
364 // Value for stack limit that is used to cause an interrupt. 371 // 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 372 // Note that on DBC stack is growing upwards so interrupt limit is 0 unlike
366 // on all other architectures. 373 // on all other architectures.
367 static const uword kInterruptStackLimit = ~static_cast<uword>(0); 374 static const uword kInterruptStackLimit = ~static_cast<uword>(0);
368 #endif 375 #endif
369 376
370 } // namespace dart 377 } // namespace dart
371 378
372 #endif // VM_STACK_FRAME_H_ 379 #endif // VM_STACK_FRAME_H_
OLDNEW
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/stack_frame.cc » ('j') | runtime/vm/stack_frame_dbc.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698