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

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

Issue 2927073002: Fixed misleading cutnpaste error in comment (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | 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 #ifndef RUNTIME_VM_RAW_OBJECT_H_ 5 #ifndef RUNTIME_VM_RAW_OBJECT_H_
6 #define RUNTIME_VM_RAW_OBJECT_H_ 6 #define RUNTIME_VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/atomic.h" 9 #include "vm/atomic.h"
10 #include "vm/exceptions.h" 10 #include "vm/exceptions.h"
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 if (class_id < kNumPredefinedCids) { 461 if (class_id < kNumPredefinedCids) {
462 return VisitPointersPredefined(visitor, class_id); 462 return VisitPointersPredefined(visitor, class_id);
463 } 463 }
464 464
465 // Calculate the first and last raw object pointer fields. 465 // Calculate the first and last raw object pointer fields.
466 intptr_t instance_size = Size(); 466 intptr_t instance_size = Size();
467 uword obj_addr = ToAddr(this); 467 uword obj_addr = ToAddr(this);
468 uword from = obj_addr + sizeof(RawObject); 468 uword from = obj_addr + sizeof(RawObject);
469 uword to = obj_addr + instance_size - kWordSize; 469 uword to = obj_addr + instance_size - kWordSize;
470 470
471 // Call visitor function non-virtually 471 // Call visitor function virtually
472 visitor->VisitPointers(reinterpret_cast<RawObject**>(from), 472 visitor->VisitPointers(reinterpret_cast<RawObject**>(from),
473 reinterpret_cast<RawObject**>(to)); 473 reinterpret_cast<RawObject**>(to));
474 474
475 return instance_size; 475 return instance_size;
476 } 476 }
477 477
478 template <class V> 478 template <class V>
479 intptr_t VisitPointersNonvirtual(V* visitor) { 479 intptr_t VisitPointersNonvirtual(V* visitor) {
480 // Fall back to virtual variant for predefined classes 480 // Fall back to virtual variant for predefined classes
481 intptr_t class_id = GetClassId(); 481 intptr_t class_id = GetClassId();
(...skipping 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after
2494 kTypedDataInt8ArrayViewCid + 15); 2494 kTypedDataInt8ArrayViewCid + 15);
2495 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2495 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2496 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2496 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2497 return (kNullCid - kTypedDataInt8ArrayCid); 2497 return (kNullCid - kTypedDataInt8ArrayCid);
2498 } 2498 }
2499 2499
2500 2500
2501 } // namespace dart 2501 } // namespace dart
2502 2502
2503 #endif // RUNTIME_VM_RAW_OBJECT_H_ 2503 #endif // RUNTIME_VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698