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

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

Issue 1638143002: Precompilation: compact the symbol table. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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/precompiler.cc ('k') | runtime/vm/symbols.h » ('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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 } 424 }
425 bool IsFunction() { 425 bool IsFunction() {
426 return ((GetClassId() == kFunctionCid)); 426 return ((GetClassId() == kFunctionCid));
427 } 427 }
428 bool IsInstructions() { 428 bool IsInstructions() {
429 return ((GetClassId() == kInstructionsCid)); 429 return ((GetClassId() == kInstructionsCid));
430 } 430 }
431 bool IsCode() { 431 bool IsCode() {
432 return ((GetClassId() == kCodeCid)); 432 return ((GetClassId() == kCodeCid));
433 } 433 }
434 bool IsString() {
435 return IsStringClassId(GetClassId());
436 }
434 437
435 intptr_t Size() const { 438 intptr_t Size() const {
436 uword tags = ptr()->tags_; 439 uword tags = ptr()->tags_;
437 intptr_t result = SizeTag::decode(tags); 440 intptr_t result = SizeTag::decode(tags);
438 if (result != 0) { 441 if (result != 0) {
439 ASSERT(result == SizeFromClass()); 442 ASSERT(result == SizeFromClass());
440 return result; 443 return result;
441 } 444 }
442 result = SizeFromClass(); 445 result = SizeFromClass();
443 ASSERT(result > SizeTag::kMaxSizeTag); 446 ASSERT(result > SizeTag::kMaxSizeTag);
(...skipping 1886 matching lines...) Expand 10 before | Expand all | Expand 10 after
2330 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2333 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2331 kTypedDataInt8ArrayViewCid + 15); 2334 kTypedDataInt8ArrayViewCid + 15);
2332 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2335 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2333 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2336 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2334 return (kNullCid - kTypedDataInt8ArrayCid); 2337 return (kNullCid - kTypedDataInt8ArrayCid);
2335 } 2338 }
2336 2339
2337 } // namespace dart 2340 } // namespace dart
2338 2341
2339 #endif // VM_RAW_OBJECT_H_ 2342 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698