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

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

Issue 1584443002: VM: Precompiled rodata snapshot. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: compute string hash if necessary Created 4 years, 10 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/pages.cc ('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) 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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 } 429 }
430 bool IsInstructions() { 430 bool IsInstructions() {
431 return ((GetClassId() == kInstructionsCid)); 431 return ((GetClassId() == kInstructionsCid));
432 } 432 }
433 bool IsCode() { 433 bool IsCode() {
434 return ((GetClassId() == kCodeCid)); 434 return ((GetClassId() == kCodeCid));
435 } 435 }
436 bool IsString() { 436 bool IsString() {
437 return IsStringClassId(GetClassId()); 437 return IsStringClassId(GetClassId());
438 } 438 }
439 bool IsStackmap() {
440 return ((GetClassId() == kStackmapCid));
441 }
442 bool IsPcDescriptors() {
443 return ((GetClassId() == kPcDescriptorsCid));
444 }
445 bool IsOneByteString() {
446 return ((GetClassId() == kOneByteStringCid));
447 }
439 448
440 intptr_t Size() const { 449 intptr_t Size() const {
441 uword tags = ptr()->tags_; 450 uword tags = ptr()->tags_;
442 intptr_t result = SizeTag::decode(tags); 451 intptr_t result = SizeTag::decode(tags);
443 if (result != 0) { 452 if (result != 0) {
444 ASSERT(result == SizeFromClass()); 453 ASSERT(result == SizeFromClass());
445 return result; 454 return result;
446 } 455 }
447 result = SizeFromClass(); 456 result = SizeFromClass();
448 ASSERT(result > SizeTag::kMaxSizeTag); 457 ASSERT(result > SizeTag::kMaxSizeTag);
(...skipping 1887 matching lines...) Expand 10 before | Expand all | Expand 10 after
2336 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2345 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2337 kTypedDataInt8ArrayViewCid + 15); 2346 kTypedDataInt8ArrayViewCid + 15);
2338 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2347 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2339 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2348 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2340 return (kNullCid - kTypedDataInt8ArrayCid); 2349 return (kNullCid - kTypedDataInt8ArrayCid);
2341 } 2350 }
2342 2351
2343 } // namespace dart 2352 } // namespace dart
2344 2353
2345 #endif // VM_RAW_OBJECT_H_ 2354 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/pages.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698