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

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

Issue 12260026: Add support for object pool (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/stub_code.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 #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/freelist.h" 8 #include "vm/freelist.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 reinterpret_cast<RawObject**>(entry_point + offset)); 465 reinterpret_cast<RawObject**>(entry_point + offset));
466 } 466 }
467 } 467 }
468 return Code::InstanceSize(length); 468 return Code::InstanceSize(length);
469 } 469 }
470 470
471 471
472 intptr_t RawInstructions::VisitInstructionsPointers( 472 intptr_t RawInstructions::VisitInstructionsPointers(
473 RawInstructions* raw_obj, ObjectPointerVisitor* visitor) { 473 RawInstructions* raw_obj, ObjectPointerVisitor* visitor) {
474 RawInstructions* obj = raw_obj->ptr(); 474 RawInstructions* obj = raw_obj->ptr();
475 visitor->VisitPointer(reinterpret_cast<RawObject**>(&obj->code_)); 475 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
476 return Instructions::InstanceSize(obj->size_); 476 return Instructions::InstanceSize(obj->size_);
477 } 477 }
478 478
479 479
480 bool RawInstructions::ContainsPC(RawObject* raw_obj, uword pc) { 480 bool RawInstructions::ContainsPC(RawObject* raw_obj, uword pc) {
481 uword tags = raw_obj->ptr()->tags_; 481 uword tags = raw_obj->ptr()->tags_;
482 if (RawObject::ClassIdTag::decode(tags) == kInstructionsCid) { 482 if (RawObject::ClassIdTag::decode(tags) == kInstructionsCid) {
483 RawInstructions* raw_instr = reinterpret_cast<RawInstructions*>(raw_obj); 483 RawInstructions* raw_instr = reinterpret_cast<RawInstructions*>(raw_obj);
484 uword start_pc = 484 uword start_pc =
485 reinterpret_cast<uword>(raw_instr->ptr()) + Instructions::HeaderSize(); 485 reinterpret_cast<uword>(raw_instr->ptr()) + Instructions::HeaderSize();
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 1007
1008 intptr_t RawWeakProperty::VisitWeakPropertyPointers( 1008 intptr_t RawWeakProperty::VisitWeakPropertyPointers(
1009 RawWeakProperty* raw_obj, ObjectPointerVisitor* visitor) { 1009 RawWeakProperty* raw_obj, ObjectPointerVisitor* visitor) {
1010 // Make sure that we got here with the tagged pointer as this. 1010 // Make sure that we got here with the tagged pointer as this.
1011 ASSERT(raw_obj->IsHeapObject()); 1011 ASSERT(raw_obj->IsHeapObject());
1012 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 1012 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
1013 return WeakProperty::InstanceSize(); 1013 return WeakProperty::InstanceSize();
1014 } 1014 }
1015 1015
1016 } // namespace dart 1016 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/stub_code.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698