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

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

Issue 1722733002: In background compilation make a copy of Field in order to freeze its state (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: s Created 4 years, 9 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/parser.cc ('k') | runtime/vm/redundancy_elimination.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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 417
418 bool IsDartInstance() { 418 bool IsDartInstance() {
419 return (!IsHeapObject() || (GetClassId() >= kInstanceCid)); 419 return (!IsHeapObject() || (GetClassId() >= kInstanceCid));
420 } 420 }
421 bool IsFreeListElement() { 421 bool IsFreeListElement() {
422 return ((GetClassId() == kFreeListElement)); 422 return ((GetClassId() == kFreeListElement));
423 } 423 }
424 bool IsScript() { 424 bool IsScript() {
425 return ((GetClassId() == kScriptCid)); 425 return ((GetClassId() == kScriptCid));
426 } 426 }
427 bool IsField() {
428 return ((GetClassId() == kFieldCid));
429 }
427 bool IsFunction() { 430 bool IsFunction() {
428 return ((GetClassId() == kFunctionCid)); 431 return ((GetClassId() == kFunctionCid));
429 } 432 }
430 bool IsInstructions() { 433 bool IsInstructions() {
431 return ((GetClassId() == kInstructionsCid)); 434 return ((GetClassId() == kInstructionsCid));
432 } 435 }
433 bool IsCode() { 436 bool IsCode() {
434 return ((GetClassId() == kCodeCid)); 437 return ((GetClassId() == kCodeCid));
435 } 438 }
436 bool IsString() { 439 bool IsString() {
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 } 877 }
875 }; 878 };
876 879
877 880
878 class RawField : public RawObject { 881 class RawField : public RawObject {
879 RAW_HEAP_OBJECT_IMPLEMENTATION(Field); 882 RAW_HEAP_OBJECT_IMPLEMENTATION(Field);
880 883
881 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } 884 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
882 RawString* name_; 885 RawString* name_;
883 RawObject* owner_; // Class or patch class or mixin class 886 RawObject* owner_; // Class or patch class or mixin class
884 // where this field is defined. 887 // where this field is defined or original field.
885 RawAbstractType* type_; 888 RawAbstractType* type_;
886 union { 889 union {
887 RawInstance* static_value_; // Value for static fields. 890 RawInstance* static_value_; // Value for static fields.
888 RawSmi* offset_; // Offset in words for instance fields. 891 RawSmi* offset_; // Offset in words for instance fields.
889 } value_; 892 } value_;
890 union { 893 union {
891 // When precompiling we need to save the static initializer function here 894 // When precompiling we need to save the static initializer function here
892 // so that code for it can be generated. 895 // so that code for it can be generated.
893 RawFunction* precompiled_; // Static initializer function - precompiling. 896 RawFunction* precompiled_; // Static initializer function - precompiling.
894 // When generating script snapshots after running the application it is 897 // When generating script snapshots after running the application it is
(...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after
2352 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2355 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2353 kTypedDataInt8ArrayViewCid + 15); 2356 kTypedDataInt8ArrayViewCid + 15);
2354 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2357 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2355 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2358 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2356 return (kNullCid - kTypedDataInt8ArrayCid); 2359 return (kNullCid - kTypedDataInt8ArrayCid);
2357 } 2360 }
2358 2361
2359 } // namespace dart 2362 } // namespace dart
2360 2363
2361 #endif // VM_RAW_OBJECT_H_ 2364 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/redundancy_elimination.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698