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

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

Issue 1814623003: 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') | runtime/vm/raw_object.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 4296 matching lines...) Expand 10 before | Expand all | Expand 10 after
4307 private: 4307 private:
4308 static void UnpackInto(const Array& table, 4308 static void UnpackInto(const Array& table,
4309 const TypedData& packed, 4309 const TypedData& packed,
4310 GrowableArray<DeoptInstr*>* instructions, 4310 GrowableArray<DeoptInstr*>* instructions,
4311 intptr_t length); 4311 intptr_t length);
4312 }; 4312 };
4313 4313
4314 4314
4315 class Code : public Object { 4315 class Code : public Object {
4316 public: 4316 public:
4317 RawInstructions* active_instructions() const { 4317 uword active_entry_point() const { return raw_ptr()->entry_point_; }
4318 return raw_ptr()->active_instructions_;
4319 }
4320 4318
4321 RawInstructions* instructions() const { return raw_ptr()->instructions_; } 4319 RawInstructions* instructions() const { return raw_ptr()->instructions_; }
4322 4320
4323 static intptr_t saved_instructions_offset() { 4321 static intptr_t saved_instructions_offset() {
4324 return OFFSET_OF(RawCode, instructions_); 4322 return OFFSET_OF(RawCode, instructions_);
4325 } 4323 }
4326 4324
4327 static intptr_t entry_point_offset() { 4325 static intptr_t entry_point_offset() {
4328 return OFFSET_OF(RawCode, entry_point_); 4326 return OFFSET_OF(RawCode, entry_point_);
4329 } 4327 }
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
4591 bool IsStubCode() const; 4589 bool IsStubCode() const;
4592 bool IsFunctionCode() const; 4590 bool IsFunctionCode() const;
4593 4591
4594 void DisableDartCode() const; 4592 void DisableDartCode() const;
4595 4593
4596 void DisableStubCode() const; 4594 void DisableStubCode() const;
4597 4595
4598 void Enable() const { 4596 void Enable() const {
4599 if (!IsDisabled()) return; 4597 if (!IsDisabled()) return;
4600 ASSERT(Thread::Current()->IsMutatorThread()); 4598 ASSERT(Thread::Current()->IsMutatorThread());
4601 ASSERT(instructions() != active_instructions());
4602 SetActiveInstructions(instructions()); 4599 SetActiveInstructions(instructions());
4603 } 4600 }
4604 4601
4605 bool IsDisabled() const { 4602 bool IsDisabled() const {
4606 return instructions() != active_instructions(); 4603 return active_entry_point() != EntryPoint();
4607 } 4604 }
4608 4605
4609 private: 4606 private:
4610 void set_state_bits(intptr_t bits) const; 4607 void set_state_bits(intptr_t bits) const;
4611 4608
4612 void set_object_pool(RawObjectPool* object_pool) const { 4609 void set_object_pool(RawObjectPool* object_pool) const {
4613 StorePointer(&raw_ptr()->object_pool_, object_pool); 4610 StorePointer(&raw_ptr()->object_pool_, object_pool);
4614 } 4611 }
4615 4612
4616 friend class RawObject; // For RawObject::SizeFromClass(). 4613 friend class RawObject; // For RawObject::SizeFromClass().
(...skipping 3873 matching lines...) Expand 10 before | Expand all | Expand 10 after
8490 8487
8491 8488
8492 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 8489 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
8493 intptr_t index) { 8490 intptr_t index) {
8494 return array.At((index * kEntryLength) + kTargetFunctionIndex); 8491 return array.At((index * kEntryLength) + kTargetFunctionIndex);
8495 } 8492 }
8496 8493
8497 } // namespace dart 8494 } // namespace dart
8498 8495
8499 #endif // VM_OBJECT_H_ 8496 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/raw_object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698