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

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

Issue 2891053003: Add support for converted closures with explicit contexts to VM (Closed)
Patch Set: Temporarily disable Run step in closures test suite Created 3 years, 5 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') | 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 kByteDataViewCid, 177 kByteDataViewCid,
178 178
179 #define DEFINE_OBJECT_KIND(clazz) kExternalTypedData##clazz##Cid, 179 #define DEFINE_OBJECT_KIND(clazz) kExternalTypedData##clazz##Cid,
180 CLASS_LIST_TYPED_DATA(DEFINE_OBJECT_KIND) 180 CLASS_LIST_TYPED_DATA(DEFINE_OBJECT_KIND)
181 #undef DEFINE_OBJECT_KIND 181 #undef DEFINE_OBJECT_KIND
182 182
183 kByteBufferCid, 183 kByteBufferCid,
184 184
185 // The following entries do not describe a predefined class, but instead 185 // The following entries do not describe a predefined class, but instead
186 // are class indexes for pre-allocated instances (Null, dynamic and Void). 186 // are class indexes for pre-allocated instances (Null, dynamic, Void and
187 // Vector).
187 kNullCid, 188 kNullCid,
188 kDynamicCid, 189 kDynamicCid,
189 kVoidCid, 190 kVoidCid,
191 kVectorCid,
190 192
191 kNumPredefinedCids, 193 kNumPredefinedCids,
192 }; 194 };
193 195
194 enum ObjectAlignment { 196 enum ObjectAlignment {
195 // Alignment offsets are used to determine object age. 197 // Alignment offsets are used to determine object age.
196 kNewObjectAlignmentOffset = kWordSize, 198 kNewObjectAlignmentOffset = kWordSize,
197 kOldObjectAlignmentOffset = 0, 199 kOldObjectAlignmentOffset = 0,
198 // Object sizes are aligned to kObjectAlignment. 200 // Object sizes are aligned to kObjectAlignment.
199 kObjectAlignment = 2 * kWordSize, 201 kObjectAlignment = 2 * kWordSize,
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->script_); } 824 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->script_); }
823 825
824 friend class Function; 826 friend class Function;
825 }; 827 };
826 828
827 class RawFunction : public RawObject { 829 class RawFunction : public RawObject {
828 public: 830 public:
829 enum Kind { 831 enum Kind {
830 kRegularFunction, 832 kRegularFunction,
831 kClosureFunction, 833 kClosureFunction,
834 kConvertedClosureFunction,
832 kSignatureFunction, // represents a signature only without actual code. 835 kSignatureFunction, // represents a signature only without actual code.
833 kGetterFunction, // represents getter functions e.g: get foo() { .. }. 836 kGetterFunction, // represents getter functions e.g: get foo() { .. }.
834 kSetterFunction, // represents setter functions e.g: set foo(..) { .. }. 837 kSetterFunction, // represents setter functions e.g: set foo(..) { .. }.
835 kConstructor, 838 kConstructor,
836 kImplicitGetter, // represents an implicit getter for fields. 839 kImplicitGetter, // represents an implicit getter for fields.
837 kImplicitSetter, // represents an implicit setter for fields. 840 kImplicitSetter, // represents an implicit setter for fields.
838 kImplicitStaticFinalGetter, // represents an implicit getter for static 841 kImplicitStaticFinalGetter, // represents an implicit getter for static
839 // final fields (incl. static const fields). 842 // final fields (incl. static const fields).
840 kMethodExtractor, // converts method into implicit closure on the receiver. 843 kMethodExtractor, // converts method into implicit closure on the receiver.
841 kNoSuchMethodDispatcher, // invokes noSuchMethod. 844 kNoSuchMethodDispatcher, // invokes noSuchMethod.
(...skipping 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after
2434 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2437 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2435 kTypedDataInt8ArrayViewCid + 15); 2438 kTypedDataInt8ArrayViewCid + 15);
2436 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2439 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2437 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2440 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2438 return (kNullCid - kTypedDataInt8ArrayCid); 2441 return (kNullCid - kTypedDataInt8ArrayCid);
2439 } 2442 }
2440 2443
2441 } // namespace dart 2444 } // namespace dart
2442 2445
2443 #endif // RUNTIME_VM_RAW_OBJECT_H_ 2446 #endif // RUNTIME_VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698