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

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

Issue 2891053003: Add support for converted closures with explicit contexts to VM (Closed)
Patch Set: Created 3 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
« runtime/vm/kernel_to_il.cc ('K') | « 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 kByteDataViewCid, 179 kByteDataViewCid,
180 180
181 #define DEFINE_OBJECT_KIND(clazz) kExternalTypedData##clazz##Cid, 181 #define DEFINE_OBJECT_KIND(clazz) kExternalTypedData##clazz##Cid,
182 CLASS_LIST_TYPED_DATA(DEFINE_OBJECT_KIND) 182 CLASS_LIST_TYPED_DATA(DEFINE_OBJECT_KIND)
183 #undef DEFINE_OBJECT_KIND 183 #undef DEFINE_OBJECT_KIND
184 184
185 kByteBufferCid, 185 kByteBufferCid,
186 186
187 // The following entries do not describe a predefined class, but instead 187 // The following entries do not describe a predefined class, but instead
188 // are class indexes for pre-allocated instances (Null, dynamic and Void). 188 // are class indexes for pre-allocated instances (Null, dynamic, Void and
189 // Vector).
189 kNullCid, 190 kNullCid,
190 kDynamicCid, 191 kDynamicCid,
191 kVoidCid, 192 kVoidCid,
193 kVectorCid,
192 194
193 kNumPredefinedCids, 195 kNumPredefinedCids,
194 }; 196 };
195 197
196 enum ObjectAlignment { 198 enum ObjectAlignment {
197 // Alignment offsets are used to determine object age. 199 // Alignment offsets are used to determine object age.
198 kNewObjectAlignmentOffset = kWordSize, 200 kNewObjectAlignmentOffset = kWordSize,
199 kOldObjectAlignmentOffset = 0, 201 kOldObjectAlignmentOffset = 0,
200 // Object sizes are aligned to kObjectAlignment. 202 // Object sizes are aligned to kObjectAlignment.
201 kObjectAlignment = 2 * kWordSize, 203 kObjectAlignment = 2 * kWordSize,
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 776
775 friend class Function; 777 friend class Function;
776 }; 778 };
777 779
778 780
779 class RawFunction : public RawObject { 781 class RawFunction : public RawObject {
780 public: 782 public:
781 enum Kind { 783 enum Kind {
782 kRegularFunction, 784 kRegularFunction,
783 kClosureFunction, 785 kClosureFunction,
786 kConvertedClosureFunction,
784 kSignatureFunction, // represents a signature only without actual code. 787 kSignatureFunction, // represents a signature only without actual code.
785 kGetterFunction, // represents getter functions e.g: get foo() { .. }. 788 kGetterFunction, // represents getter functions e.g: get foo() { .. }.
786 kSetterFunction, // represents setter functions e.g: set foo(..) { .. }. 789 kSetterFunction, // represents setter functions e.g: set foo(..) { .. }.
787 kConstructor, 790 kConstructor,
788 kImplicitGetter, // represents an implicit getter for fields. 791 kImplicitGetter, // represents an implicit getter for fields.
789 kImplicitSetter, // represents an implicit setter for fields. 792 kImplicitSetter, // represents an implicit setter for fields.
790 kImplicitStaticFinalGetter, // represents an implicit getter for static 793 kImplicitStaticFinalGetter, // represents an implicit getter for static
791 // final fields (incl. static const fields). 794 // final fields (incl. static const fields).
792 kMethodExtractor, // converts method into implicit closure on the receiver. 795 kMethodExtractor, // converts method into implicit closure on the receiver.
793 kNoSuchMethodDispatcher, // invokes noSuchMethod. 796 kNoSuchMethodDispatcher, // invokes noSuchMethod.
(...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after
2451 kTypedDataInt8ArrayViewCid + 15); 2454 kTypedDataInt8ArrayViewCid + 15);
2452 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2455 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2453 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2456 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2454 return (kNullCid - kTypedDataInt8ArrayCid); 2457 return (kNullCid - kTypedDataInt8ArrayCid);
2455 } 2458 }
2456 2459
2457 2460
2458 } // namespace dart 2461 } // namespace dart
2459 2462
2460 #endif // RUNTIME_VM_RAW_OBJECT_H_ 2463 #endif // RUNTIME_VM_RAW_OBJECT_H_
OLDNEW
« runtime/vm/kernel_to_il.cc ('K') | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698