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

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

Issue 1821793002: Revert "Remove Code::active_instructions_." (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') | no next file with comments »
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 4306 matching lines...) Expand 10 before | Expand all | Expand 10 after
4317 private: 4317 private:
4318 static void UnpackInto(const Array& table, 4318 static void UnpackInto(const Array& table,
4319 const TypedData& packed, 4319 const TypedData& packed,
4320 GrowableArray<DeoptInstr*>* instructions, 4320 GrowableArray<DeoptInstr*>* instructions,
4321 intptr_t length); 4321 intptr_t length);
4322 }; 4322 };
4323 4323
4324 4324
4325 class Code : public Object { 4325 class Code : public Object {
4326 public: 4326 public:
4327 uword active_entry_point() const { return raw_ptr()->entry_point_; } 4327 RawInstructions* active_instructions() const {
4328 return raw_ptr()->active_instructions_;
4329 }
4328 4330
4329 RawInstructions* instructions() const { return raw_ptr()->instructions_; } 4331 RawInstructions* instructions() const { return raw_ptr()->instructions_; }
4330 4332
4331 static intptr_t saved_instructions_offset() { 4333 static intptr_t saved_instructions_offset() {
4332 return OFFSET_OF(RawCode, instructions_); 4334 return OFFSET_OF(RawCode, instructions_);
4333 } 4335 }
4334 4336
4335 static intptr_t entry_point_offset() { 4337 static intptr_t entry_point_offset() {
4336 return OFFSET_OF(RawCode, entry_point_); 4338 return OFFSET_OF(RawCode, entry_point_);
4337 } 4339 }
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
4599 bool IsStubCode() const; 4601 bool IsStubCode() const;
4600 bool IsFunctionCode() const; 4602 bool IsFunctionCode() const;
4601 4603
4602 void DisableDartCode() const; 4604 void DisableDartCode() const;
4603 4605
4604 void DisableStubCode() const; 4606 void DisableStubCode() const;
4605 4607
4606 void Enable() const { 4608 void Enable() const {
4607 if (!IsDisabled()) return; 4609 if (!IsDisabled()) return;
4608 ASSERT(Thread::Current()->IsMutatorThread()); 4610 ASSERT(Thread::Current()->IsMutatorThread());
4611 ASSERT(instructions() != active_instructions());
4609 SetActiveInstructions(instructions()); 4612 SetActiveInstructions(instructions());
4610 } 4613 }
4611 4614
4612 bool IsDisabled() const { 4615 bool IsDisabled() const {
4613 return active_entry_point() != EntryPoint(); 4616 return instructions() != active_instructions();
4614 } 4617 }
4615 4618
4616 private: 4619 private:
4617 void set_state_bits(intptr_t bits) const; 4620 void set_state_bits(intptr_t bits) const;
4618 4621
4619 void set_object_pool(RawObjectPool* object_pool) const { 4622 void set_object_pool(RawObjectPool* object_pool) const {
4620 StorePointer(&raw_ptr()->object_pool_, object_pool); 4623 StorePointer(&raw_ptr()->object_pool_, object_pool);
4621 } 4624 }
4622 4625
4623 friend class RawObject; // For RawObject::SizeFromClass(). 4626 friend class RawObject; // For RawObject::SizeFromClass().
(...skipping 3878 matching lines...) Expand 10 before | Expand all | Expand 10 after
8502 8505
8503 8506
8504 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 8507 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
8505 intptr_t index) { 8508 intptr_t index) {
8506 return array.At((index * kEntryLength) + kTargetFunctionIndex); 8509 return array.At((index * kEntryLength) + kTargetFunctionIndex);
8507 } 8510 }
8508 8511
8509 } // namespace dart 8512 } // namespace dart
8510 8513
8511 #endif // VM_OBJECT_H_ 8514 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698