OLD | NEW |
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 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->script_); } | 824 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->script_); } |
825 | 825 |
826 friend class Function; | 826 friend class Function; |
827 }; | 827 }; |
828 | 828 |
829 class RawFunction : public RawObject { | 829 class RawFunction : public RawObject { |
830 public: | 830 public: |
831 enum Kind { | 831 enum Kind { |
832 kRegularFunction, | 832 kRegularFunction, |
833 kClosureFunction, | 833 kClosureFunction, |
834 kImplicitClosureFunction, | |
835 kConvertedClosureFunction, | 834 kConvertedClosureFunction, |
836 kSignatureFunction, // represents a signature only without actual code. | 835 kSignatureFunction, // represents a signature only without actual code. |
837 kGetterFunction, // represents getter functions e.g: get foo() { .. }. | 836 kGetterFunction, // represents getter functions e.g: get foo() { .. }. |
838 kSetterFunction, // represents setter functions e.g: set foo(..) { .. }. | 837 kSetterFunction, // represents setter functions e.g: set foo(..) { .. }. |
839 kConstructor, | 838 kConstructor, |
840 kImplicitGetter, // represents an implicit getter for fields. | 839 kImplicitGetter, // represents an implicit getter for fields. |
841 kImplicitSetter, // represents an implicit setter for fields. | 840 kImplicitSetter, // represents an implicit setter for fields. |
842 kImplicitStaticFinalGetter, // represents an implicit getter for static | 841 kImplicitStaticFinalGetter, // represents an implicit getter for static |
843 // final fields (incl. static const fields). | 842 // final fields (incl. static const fields). |
844 kMethodExtractor, // converts method into implicit closure on the receiver. | 843 kMethodExtractor, // converts method into implicit closure on the receiver. |
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2438 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2437 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
2439 kTypedDataInt8ArrayViewCid + 15); | 2438 kTypedDataInt8ArrayViewCid + 15); |
2440 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2439 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
2441 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2440 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
2442 return (kNullCid - kTypedDataInt8ArrayCid); | 2441 return (kNullCid - kTypedDataInt8ArrayCid); |
2443 } | 2442 } |
2444 | 2443 |
2445 } // namespace dart | 2444 } // namespace dart |
2446 | 2445 |
2447 #endif // RUNTIME_VM_RAW_OBJECT_H_ | 2446 #endif // RUNTIME_VM_RAW_OBJECT_H_ |
OLD | NEW |