| 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 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/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/token.h" | 10 #include "vm/token.h" |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 class RawClosureData : public RawObject { | 632 class RawClosureData : public RawObject { |
| 633 private: | 633 private: |
| 634 RAW_HEAP_OBJECT_IMPLEMENTATION(ClosureData); | 634 RAW_HEAP_OBJECT_IMPLEMENTATION(ClosureData); |
| 635 | 635 |
| 636 RawObject** from() { | 636 RawObject** from() { |
| 637 return reinterpret_cast<RawObject**>(&ptr()->context_scope_); | 637 return reinterpret_cast<RawObject**>(&ptr()->context_scope_); |
| 638 } | 638 } |
| 639 RawContextScope* context_scope_; | 639 RawContextScope* context_scope_; |
| 640 RawFunction* parent_function_; // Enclosing function of this local function. | 640 RawFunction* parent_function_; // Enclosing function of this local function. |
| 641 RawClass* signature_class_; | 641 RawClass* signature_class_; |
| 642 union { | 642 RawInstance* closure_; // Closure object for static implicit closures. |
| 643 RawInstance* closure_; // Closure object for static implicit closures. | |
| 644 RawCode* closure_allocation_stub_; // Stub code for allocation of closures. | |
| 645 }; | |
| 646 RawObject** to() { | 643 RawObject** to() { |
| 647 return reinterpret_cast<RawObject**>(&ptr()->closure_allocation_stub_); | 644 return reinterpret_cast<RawObject**>(&ptr()->closure_); |
| 648 } | 645 } |
| 649 }; | 646 }; |
| 650 | 647 |
| 651 | 648 |
| 652 class RawRedirectionData : public RawObject { | 649 class RawRedirectionData : public RawObject { |
| 653 private: | 650 private: |
| 654 RAW_HEAP_OBJECT_IMPLEMENTATION(RedirectionData); | 651 RAW_HEAP_OBJECT_IMPLEMENTATION(RedirectionData); |
| 655 | 652 |
| 656 RawObject** from() { | 653 RawObject** from() { |
| 657 return reinterpret_cast<RawObject**>(&ptr()->type_); | 654 return reinterpret_cast<RawObject**>(&ptr()->type_); |
| (...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1771 // Make sure this is updated when new TypedData types are added. | 1768 // Make sure this is updated when new TypedData types are added. |
| 1772 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); | 1769 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); |
| 1773 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 15); | 1770 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 15); |
| 1774 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); | 1771 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); |
| 1775 return (kNullCid - kTypedDataInt8ArrayCid); | 1772 return (kNullCid - kTypedDataInt8ArrayCid); |
| 1776 } | 1773 } |
| 1777 | 1774 |
| 1778 } // namespace dart | 1775 } // namespace dart |
| 1779 | 1776 |
| 1780 #endif // VM_RAW_OBJECT_H_ | 1777 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |