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

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

Issue 8429027: Add an external array type to support typed arrays. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address final review comments Created 9 years, 1 month 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/raw_object_snapshot.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/isolate.h" 7 #include "vm/isolate.h"
8 #include "vm/object.h" 8 #include "vm/object.h"
9 #include "vm/visitor.h" 9 #include "vm/visitor.h"
10 10
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 return Array::InstanceSize(length); 470 return Array::InstanceSize(length);
471 } 471 }
472 472
473 473
474 intptr_t RawImmutableArray::VisitImmutableArrayPointers( 474 intptr_t RawImmutableArray::VisitImmutableArrayPointers(
475 RawImmutableArray* raw_obj, ObjectPointerVisitor* visitor) { 475 RawImmutableArray* raw_obj, ObjectPointerVisitor* visitor) {
476 return RawArray::VisitArrayPointers(raw_obj, visitor); 476 return RawArray::VisitArrayPointers(raw_obj, visitor);
477 } 477 }
478 478
479 479
480 intptr_t RawByteBuffer::VisitByteBufferPointers(
481 RawByteBuffer* raw_obj, ObjectPointerVisitor* visitor) {
482 // Make sure that we got here with the tagged pointer as this.
483 ASSERT(raw_obj->IsHeapObject());
484 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
485 return ByteBuffer::InstanceSize();
486 }
487
488
480 intptr_t RawClosure::VisitClosurePointers(RawClosure* raw_obj, 489 intptr_t RawClosure::VisitClosurePointers(RawClosure* raw_obj,
481 ObjectPointerVisitor* visitor) { 490 ObjectPointerVisitor* visitor) {
482 // Make sure that we got here with the tagged pointer as this. 491 // Make sure that we got here with the tagged pointer as this.
483 ASSERT(raw_obj->IsHeapObject()); 492 ASSERT(raw_obj->IsHeapObject());
484 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 493 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
485 return Closure::InstanceSize(); 494 return Closure::InstanceSize();
486 } 495 }
487 496
488 497
489 intptr_t RawStacktrace::VisitStacktracePointers(RawStacktrace* raw_obj, 498 intptr_t RawStacktrace::VisitStacktracePointers(RawStacktrace* raw_obj,
490 ObjectPointerVisitor* visitor) { 499 ObjectPointerVisitor* visitor) {
491 // Make sure that we got here with the tagged pointer as this. 500 // Make sure that we got here with the tagged pointer as this.
492 ASSERT(raw_obj->IsHeapObject()); 501 ASSERT(raw_obj->IsHeapObject());
493 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 502 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
494 return Stacktrace::InstanceSize(); 503 return Stacktrace::InstanceSize();
495 } 504 }
496 505
497 506
498 intptr_t RawJSRegExp::VisitJSRegExpPointers(RawJSRegExp* raw_obj, 507 intptr_t RawJSRegExp::VisitJSRegExpPointers(RawJSRegExp* raw_obj,
499 ObjectPointerVisitor* visitor) { 508 ObjectPointerVisitor* visitor) {
500 // Make sure that we got here with the tagged pointer as this. 509 // Make sure that we got here with the tagged pointer as this.
501 ASSERT(raw_obj->IsHeapObject()); 510 ASSERT(raw_obj->IsHeapObject());
502 intptr_t length = Smi::Value(raw_obj->ptr()->data_length_); 511 intptr_t length = Smi::Value(raw_obj->ptr()->data_length_);
503 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 512 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
504 return JSRegExp::InstanceSize(length); 513 return JSRegExp::InstanceSize(length);
505 } 514 }
506 515
507 } // namespace dart 516 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698