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

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: Make loads and stores byte relative 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 RawByteBuffer::VisitByteBufferPointers(
480 RawByteBuffer* raw_obj, ObjectPointerVisitor* visitor) {
481 // Make sure that we got here with the tagged pointer as this.
482 ASSERT(raw_obj->IsHeapObject());
483 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
484 return ByteBuffer::InstanceSize();
485 }
486
487
479 intptr_t RawClosure::VisitClosurePointers(RawClosure* raw_obj, 488 intptr_t RawClosure::VisitClosurePointers(RawClosure* raw_obj,
480 ObjectPointerVisitor* visitor) { 489 ObjectPointerVisitor* visitor) {
481 // Make sure that we got here with the tagged pointer as this. 490 // Make sure that we got here with the tagged pointer as this.
482 ASSERT(raw_obj->IsHeapObject()); 491 ASSERT(raw_obj->IsHeapObject());
483 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 492 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
484 return Closure::InstanceSize(); 493 return Closure::InstanceSize();
485 } 494 }
486 495
487 496
488 intptr_t RawStacktrace::VisitStacktracePointers(RawStacktrace* raw_obj, 497 intptr_t RawStacktrace::VisitStacktracePointers(RawStacktrace* raw_obj,
489 ObjectPointerVisitor* visitor) { 498 ObjectPointerVisitor* visitor) {
490 // Make sure that we got here with the tagged pointer as this. 499 // Make sure that we got here with the tagged pointer as this.
491 ASSERT(raw_obj->IsHeapObject()); 500 ASSERT(raw_obj->IsHeapObject());
492 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 501 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
493 return Stacktrace::InstanceSize(); 502 return Stacktrace::InstanceSize();
494 } 503 }
495 504
496 505
497 intptr_t RawJSRegExp::VisitJSRegExpPointers(RawJSRegExp* raw_obj, 506 intptr_t RawJSRegExp::VisitJSRegExpPointers(RawJSRegExp* raw_obj,
498 ObjectPointerVisitor* visitor) { 507 ObjectPointerVisitor* visitor) {
499 // Make sure that we got here with the tagged pointer as this. 508 // Make sure that we got here with the tagged pointer as this.
500 ASSERT(raw_obj->IsHeapObject()); 509 ASSERT(raw_obj->IsHeapObject());
501 intptr_t length = Smi::Value(raw_obj->ptr()->data_length_); 510 intptr_t length = Smi::Value(raw_obj->ptr()->data_length_);
502 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); 511 visitor->VisitPointers(raw_obj->from(), raw_obj->to());
503 return JSRegExp::InstanceSize(length); 512 return JSRegExp::InstanceSize(length);
504 } 513 }
505 514
506 } // namespace dart 515 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698