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

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: 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
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/object.h" 7 #include "vm/object.h"
8 #include "vm/visitor.h" 8 #include "vm/visitor.h"
9 9
10 10
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 return Array::InstanceSize(length); 469 return Array::InstanceSize(length);
470 } 470 }
471 471
472 472
473 intptr_t RawImmutableArray::VisitImmutableArrayPointers( 473 intptr_t RawImmutableArray::VisitImmutableArrayPointers(
474 RawImmutableArray* raw_obj, ObjectPointerVisitor* visitor) { 474 RawImmutableArray* raw_obj, ObjectPointerVisitor* visitor) {
475 return RawArray::VisitArrayPointers(raw_obj, visitor); 475 return RawArray::VisitArrayPointers(raw_obj, visitor);
476 } 476 }
477 477
478 478
479 intptr_t RawExternalArray::VisitExternalArrayPointers(
480 RawExternalArray* raw_obj, ObjectPointerVisitor* visitor) {
481 // Make sure that we got here with the tagged pointer as this.
482 ASSERT(raw_obj->IsHeapObject());
siva 2011/11/02 17:05:31 I would add visitor->VisitPointers(from, to) for c
cshapiro 2011/11/04 18:16:21 Added. Done.
483 return ExternalArray::InstanceSize();
484 }
485
486
479 intptr_t RawClosure::VisitClosurePointers(RawClosure* raw_obj, 487 intptr_t RawClosure::VisitClosurePointers(RawClosure* raw_obj,
480 ObjectPointerVisitor* visitor) { 488 ObjectPointerVisitor* visitor) {
481 // Make sure that we got here with the tagged pointer as this. 489 // Make sure that we got here with the tagged pointer as this.
482 ASSERT(raw_obj->IsHeapObject()); 490 ASSERT(raw_obj->IsHeapObject());
483 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 491 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
484 return Closure::InstanceSize(); 492 return Closure::InstanceSize();
485 } 493 }
486 494
487 495
488 intptr_t RawStacktrace::VisitStacktracePointers(RawStacktrace* raw_obj, 496 intptr_t RawStacktrace::VisitStacktracePointers(RawStacktrace* raw_obj,
489 ObjectPointerVisitor* visitor) { 497 ObjectPointerVisitor* visitor) {
490 // Make sure that we got here with the tagged pointer as this. 498 // Make sure that we got here with the tagged pointer as this.
491 ASSERT(raw_obj->IsHeapObject()); 499 ASSERT(raw_obj->IsHeapObject());
492 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 500 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
493 return Stacktrace::InstanceSize(); 501 return Stacktrace::InstanceSize();
494 } 502 }
495 503
496 504
497 intptr_t RawJSRegExp::VisitJSRegExpPointers(RawJSRegExp* raw_obj, 505 intptr_t RawJSRegExp::VisitJSRegExpPointers(RawJSRegExp* raw_obj,
498 ObjectPointerVisitor* visitor) { 506 ObjectPointerVisitor* visitor) {
499 // Make sure that we got here with the tagged pointer as this. 507 // Make sure that we got here with the tagged pointer as this.
500 ASSERT(raw_obj->IsHeapObject()); 508 ASSERT(raw_obj->IsHeapObject());
501 intptr_t length = Smi::Value(raw_obj->ptr()->data_length_); 509 intptr_t length = Smi::Value(raw_obj->ptr()->data_length_);
502 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 510 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
503 return JSRegExp::InstanceSize(length); 511 return JSRegExp::InstanceSize(length);
504 } 512 }
505 513
506 } // namespace dart 514 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698