| 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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 class RawClosureData : public RawObject { | 565 class RawClosureData : public RawObject { |
| 566 private: | 566 private: |
| 567 RAW_HEAP_OBJECT_IMPLEMENTATION(ClosureData); | 567 RAW_HEAP_OBJECT_IMPLEMENTATION(ClosureData); |
| 568 | 568 |
| 569 RawObject** from() { | 569 RawObject** from() { |
| 570 return reinterpret_cast<RawObject**>(&ptr()->context_scope_); | 570 return reinterpret_cast<RawObject**>(&ptr()->context_scope_); |
| 571 } | 571 } |
| 572 RawContextScope* context_scope_; | 572 RawContextScope* context_scope_; |
| 573 RawFunction* parent_function_; // Enclosing function of this local function. | 573 RawFunction* parent_function_; // Enclosing function of this local function. |
| 574 RawClass* signature_class_; | 574 RawClass* signature_class_; |
| 575 RawCode* closure_allocation_stub_; // Stub code for allocation of closures. | 575 union { |
| 576 RawInstance* closure_; // Closure object for static implicit closures. |
| 577 RawCode* closure_allocation_stub_; // Stub code for allocation of closures. |
| 578 }; |
| 576 RawObject** to() { | 579 RawObject** to() { |
| 577 return reinterpret_cast<RawObject**>(&ptr()->closure_allocation_stub_); | 580 return reinterpret_cast<RawObject**>(&ptr()->closure_allocation_stub_); |
| 578 } | 581 } |
| 579 }; | 582 }; |
| 580 | 583 |
| 581 | 584 |
| 582 class RawRedirectionData : public RawObject { | 585 class RawRedirectionData : public RawObject { |
| 583 private: | 586 private: |
| 584 RAW_HEAP_OBJECT_IMPLEMENTATION(RedirectionData); | 587 RAW_HEAP_OBJECT_IMPLEMENTATION(RedirectionData); |
| 585 | 588 |
| (...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1614 kExternalUint64ArrayCid == kExternalInt8ArrayCid + 7 && | 1617 kExternalUint64ArrayCid == kExternalInt8ArrayCid + 7 && |
| 1615 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 8 && | 1618 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 8 && |
| 1616 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 9 && | 1619 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 9 && |
| 1617 kStacktraceCid == kExternalInt8ArrayCid + 10); | 1620 kStacktraceCid == kExternalInt8ArrayCid + 10); |
| 1618 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid); | 1621 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid); |
| 1619 } | 1622 } |
| 1620 | 1623 |
| 1621 } // namespace dart | 1624 } // namespace dart |
| 1622 | 1625 |
| 1623 #endif // VM_RAW_OBJECT_H_ | 1626 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |