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

Side by Side Diff: runtime/vm/raw_object.cc

Issue 1377583005: Restore back pointer from Instructions to Code (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « runtime/vm/raw_object.h ('k') | no next file » | 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 #include "vm/raw_object.h" 5 #include "vm/raw_object.h"
6 6
7 #include "vm/class_table.h" 7 #include "vm/class_table.h"
8 #include "vm/dart.h" 8 #include "vm/dart.h"
9 #include "vm/freelist.h" 9 #include "vm/freelist.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 visitor->VisitPointer(&(first + i)->raw_obj_); 549 visitor->VisitPointer(&(first + i)->raw_obj_);
550 } 550 }
551 } 551 }
552 return ObjectPool::InstanceSize(raw_obj->ptr()->length_); 552 return ObjectPool::InstanceSize(raw_obj->ptr()->length_);
553 } 553 }
554 554
555 555
556 intptr_t RawInstructions::VisitInstructionsPointers( 556 intptr_t RawInstructions::VisitInstructionsPointers(
557 RawInstructions* raw_obj, ObjectPointerVisitor* visitor) { 557 RawInstructions* raw_obj, ObjectPointerVisitor* visitor) {
558 RawInstructions* obj = raw_obj->ptr(); 558 RawInstructions* obj = raw_obj->ptr();
559 if (!Dart::IsRunningPrecompiledCode()) {
560 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
561 }
559 return Instructions::InstanceSize(obj->size_); 562 return Instructions::InstanceSize(obj->size_);
560 } 563 }
561 564
562 565
563 bool RawInstructions::ContainsPC(RawInstructions* raw_instr, uword pc) { 566 bool RawInstructions::ContainsPC(RawInstructions* raw_instr, uword pc) {
564 uword start_pc = 567 uword start_pc =
565 reinterpret_cast<uword>(raw_instr->ptr()) + Instructions::HeaderSize(); 568 reinterpret_cast<uword>(raw_instr->ptr()) + Instructions::HeaderSize();
566 uword end_pc = start_pc + raw_instr->ptr()->size_; 569 uword end_pc = start_pc + raw_instr->ptr()->size_;
567 ASSERT(end_pc > start_pc); 570 ASSERT(end_pc > start_pc);
568 return (pc >= start_pc) && (pc < end_pc); 571 return (pc >= start_pc) && (pc < end_pc);
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 intptr_t RawUserTag::VisitUserTagPointers( 937 intptr_t RawUserTag::VisitUserTagPointers(
935 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { 938 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) {
936 // Make sure that we got here with the tagged pointer as this. 939 // Make sure that we got here with the tagged pointer as this.
937 ASSERT(raw_obj->IsHeapObject()); 940 ASSERT(raw_obj->IsHeapObject());
938 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 941 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
939 return UserTag::InstanceSize(); 942 return UserTag::InstanceSize();
940 } 943 }
941 944
942 945
943 } // namespace dart 946 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698