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

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

Issue 1151113002: Move bootstrap scripts and token streams to the VM isolate so that they become read only objects. T… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address code review comments Created 5 years, 7 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 | « runtime/vm/object.cc ('k') | runtime/vm/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) 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 VM_RAW_OBJECT_H_ 5 #ifndef VM_RAW_OBJECT_H_
6 #define VM_RAW_OBJECT_H_ 6 #define 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/globals.h" 10 #include "vm/globals.h"
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 uword tags = ptr()->tags_; 382 uword tags = ptr()->tags_;
383 ptr()->tags_ = RememberedBit::update(false, tags); 383 ptr()->tags_ = RememberedBit::update(false, tags);
384 } 384 }
385 385
386 bool IsDartInstance() { 386 bool IsDartInstance() {
387 return (!IsHeapObject() || (GetClassId() >= kInstanceCid)); 387 return (!IsHeapObject() || (GetClassId() >= kInstanceCid));
388 } 388 }
389 bool IsFreeListElement() { 389 bool IsFreeListElement() {
390 return ((GetClassId() == kFreeListElement)); 390 return ((GetClassId() == kFreeListElement));
391 } 391 }
392 bool IsScript() {
393 return ((GetClassId() == kScriptCid));
394 }
392 395
393 intptr_t Size() const { 396 intptr_t Size() const {
394 uword tags = ptr()->tags_; 397 uword tags = ptr()->tags_;
395 intptr_t result = SizeTag::decode(tags); 398 intptr_t result = SizeTag::decode(tags);
396 if (result != 0) { 399 if (result != 0) {
397 ASSERT(result == SizeFromClass()); 400 ASSERT(result == SizeFromClass());
398 return result; 401 return result;
399 } 402 }
400 result = SizeFromClass(); 403 result = SizeFromClass();
401 ASSERT(result > SizeTag::kMaxSizeTag); 404 ASSERT(result > SizeTag::kMaxSizeTag);
(...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after
2123 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2126 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2124 kTypedDataInt8ArrayViewCid + 15); 2127 kTypedDataInt8ArrayViewCid + 15);
2125 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2128 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2126 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2129 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2127 return (kNullCid - kTypedDataInt8ArrayCid); 2130 return (kNullCid - kTypedDataInt8ArrayCid);
2128 } 2131 }
2129 2132
2130 } // namespace dart 2133 } // namespace dart
2131 2134
2132 #endif // VM_RAW_OBJECT_H_ 2135 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698