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

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

Issue 1830733002: Fix stub frame walking: when materializing the frame content during deoptimization, the stack is no… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/stack_frame.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 4305 matching lines...) Expand 10 before | Expand all | Expand 10 after
4316 private: 4316 private:
4317 static void UnpackInto(const Array& table, 4317 static void UnpackInto(const Array& table,
4318 const TypedData& packed, 4318 const TypedData& packed,
4319 GrowableArray<DeoptInstr*>* instructions, 4319 GrowableArray<DeoptInstr*>* instructions,
4320 intptr_t length); 4320 intptr_t length);
4321 }; 4321 };
4322 4322
4323 4323
4324 class Code : public Object { 4324 class Code : public Object {
4325 public: 4325 public:
4326 uword active_entry_point() const { return raw_ptr()->entry_point_; } 4326 RawInstructions* active_instructions() const {
4327 return raw_ptr()->active_instructions_;
4328 }
4327 4329
4328 RawInstructions* instructions() const { return raw_ptr()->instructions_; } 4330 RawInstructions* instructions() const { return raw_ptr()->instructions_; }
4329 4331
4330 static intptr_t saved_instructions_offset() { 4332 static intptr_t saved_instructions_offset() {
4331 return OFFSET_OF(RawCode, instructions_); 4333 return OFFSET_OF(RawCode, instructions_);
4332 } 4334 }
4333 4335
4334 static intptr_t entry_point_offset() { 4336 static intptr_t entry_point_offset() {
4335 return OFFSET_OF(RawCode, entry_point_); 4337 return OFFSET_OF(RawCode, entry_point_);
4336 } 4338 }
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
4598 bool IsStubCode() const; 4600 bool IsStubCode() const;
4599 bool IsFunctionCode() const; 4601 bool IsFunctionCode() const;
4600 4602
4601 void DisableDartCode() const; 4603 void DisableDartCode() const;
4602 4604
4603 void DisableStubCode() const; 4605 void DisableStubCode() const;
4604 4606
4605 void Enable() const { 4607 void Enable() const {
4606 if (!IsDisabled()) return; 4608 if (!IsDisabled()) return;
4607 ASSERT(Thread::Current()->IsMutatorThread()); 4609 ASSERT(Thread::Current()->IsMutatorThread());
4610 ASSERT(instructions() != active_instructions());
4608 SetActiveInstructions(instructions()); 4611 SetActiveInstructions(instructions());
4609 } 4612 }
4610 4613
4611 bool IsDisabled() const { 4614 bool IsDisabled() const {
4612 return active_entry_point() != EntryPoint(); 4615 return instructions() != active_instructions();
4613 } 4616 }
4614 4617
4615 private: 4618 private:
4616 void set_state_bits(intptr_t bits) const; 4619 void set_state_bits(intptr_t bits) const;
4617 4620
4618 void set_object_pool(RawObjectPool* object_pool) const { 4621 void set_object_pool(RawObjectPool* object_pool) const {
4619 StorePointer(&raw_ptr()->object_pool_, object_pool); 4622 StorePointer(&raw_ptr()->object_pool_, object_pool);
4620 } 4623 }
4621 4624
4622 friend class RawObject; // For RawObject::SizeFromClass(). 4625 friend class RawObject; // For RawObject::SizeFromClass().
(...skipping 3792 matching lines...) Expand 10 before | Expand all | Expand 10 after
8415 8418
8416 8419
8417 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 8420 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
8418 intptr_t index) { 8421 intptr_t index) {
8419 return array.At((index * kEntryLength) + kTargetFunctionIndex); 8422 return array.At((index * kEntryLength) + kTargetFunctionIndex);
8420 } 8423 }
8421 8424
8422 } // namespace dart 8425 } // namespace dart
8423 8426
8424 #endif // VM_OBJECT_H_ 8427 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/stack_frame.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698