| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 "vm/assert.h" | 8 #include "vm/assert.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/snapshot.h" | 10 #include "vm/snapshot.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 V(InstantiatedTypeArguments) \ | 26 V(InstantiatedTypeArguments) \ |
| 27 V(Function) \ | 27 V(Function) \ |
| 28 V(Field) \ | 28 V(Field) \ |
| 29 V(TokenStream) \ | 29 V(TokenStream) \ |
| 30 V(Script) \ | 30 V(Script) \ |
| 31 V(Library) \ | 31 V(Library) \ |
| 32 V(LibraryPrefix) \ | 32 V(LibraryPrefix) \ |
| 33 V(Code) \ | 33 V(Code) \ |
| 34 V(Instructions) \ | 34 V(Instructions) \ |
| 35 V(PcDescriptors) \ | 35 V(PcDescriptors) \ |
| 36 V(LocalVarDescriptors) \ |
| 36 V(ExceptionHandlers) \ | 37 V(ExceptionHandlers) \ |
| 37 V(Context) \ | 38 V(Context) \ |
| 38 V(ContextScope) \ | 39 V(ContextScope) \ |
| 39 V(UnhandledException) \ | 40 V(UnhandledException) \ |
| 40 V(ApiError) \ | 41 V(ApiError) \ |
| 41 V(Instance) \ | 42 V(Instance) \ |
| 42 V(Number) \ | 43 V(Number) \ |
| 43 V(Integer) \ | 44 V(Integer) \ |
| 44 V(Smi) \ | 45 V(Smi) \ |
| 45 V(Mint) \ | 46 V(Mint) \ |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 class RawCode : public RawObject { | 567 class RawCode : public RawObject { |
| 567 RAW_HEAP_OBJECT_IMPLEMENTATION(Code); | 568 RAW_HEAP_OBJECT_IMPLEMENTATION(Code); |
| 568 | 569 |
| 569 RawObject** from() { | 570 RawObject** from() { |
| 570 return reinterpret_cast<RawObject**>(&ptr()->instructions_); | 571 return reinterpret_cast<RawObject**>(&ptr()->instructions_); |
| 571 } | 572 } |
| 572 RawInstructions* instructions_; | 573 RawInstructions* instructions_; |
| 573 RawFunction* function_; | 574 RawFunction* function_; |
| 574 RawExceptionHandlers* exception_handlers_; | 575 RawExceptionHandlers* exception_handlers_; |
| 575 RawPcDescriptors* pc_descriptors_; | 576 RawPcDescriptors* pc_descriptors_; |
| 577 RawLocalVarDescriptors* var_descriptors_; |
| 576 // Ongoing redesign of inline caches may soon remove the need for 'ic_data_'. | 578 // Ongoing redesign of inline caches may soon remove the need for 'ic_data_'. |
| 577 RawArray* ic_data_; // Used to store IC stub data (see class ICData). | 579 RawArray* ic_data_; // Used to store IC stub data (see class ICData). |
| 578 RawObject** to() { | 580 RawObject** to() { |
| 579 return reinterpret_cast<RawObject**>(&ptr()->ic_data_); | 581 return reinterpret_cast<RawObject**>(&ptr()->ic_data_); |
| 580 } | 582 } |
| 581 | 583 |
| 582 intptr_t pointer_offsets_length_; | 584 intptr_t pointer_offsets_length_; |
| 583 // This cannot be boolean because of alignment issues on x64 architectures. | 585 // This cannot be boolean because of alignment issues on x64 architectures. |
| 584 intptr_t is_optimized_; | 586 intptr_t is_optimized_; |
| 585 | 587 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 604 class RawPcDescriptors : public RawObject { | 606 class RawPcDescriptors : public RawObject { |
| 605 RAW_HEAP_OBJECT_IMPLEMENTATION(PcDescriptors); | 607 RAW_HEAP_OBJECT_IMPLEMENTATION(PcDescriptors); |
| 606 | 608 |
| 607 RawSmi* length_; // Number of descriptors. | 609 RawSmi* length_; // Number of descriptors. |
| 608 | 610 |
| 609 // Variable length data follows here. | 611 // Variable length data follows here. |
| 610 intptr_t data_[0]; | 612 intptr_t data_[0]; |
| 611 }; | 613 }; |
| 612 | 614 |
| 613 | 615 |
| 616 class RawLocalVarDescriptors : public RawObject { |
| 617 RAW_HEAP_OBJECT_IMPLEMENTATION(LocalVarDescriptors); |
| 618 |
| 619 struct VarInfo { |
| 620 intptr_t index; // Slot index on stack. |
| 621 intptr_t begin_pos; // Token position of scope start. |
| 622 intptr_t end_pos; // Token position of scope end. |
| 623 }; |
| 624 |
| 625 intptr_t length_; // Number of descriptors. |
| 626 RawArray* names_; // Array of [length_] variable names. |
| 627 |
| 628 VarInfo data_[0]; // Variable info with [length_] entries. |
| 629 }; |
| 630 |
| 631 |
| 614 class RawExceptionHandlers : public RawObject { | 632 class RawExceptionHandlers : public RawObject { |
| 615 RAW_HEAP_OBJECT_IMPLEMENTATION(ExceptionHandlers); | 633 RAW_HEAP_OBJECT_IMPLEMENTATION(ExceptionHandlers); |
| 616 | 634 |
| 617 RawSmi* length_; // Number of exception handler entries. | 635 RawSmi* length_; // Number of exception handler entries. |
| 618 | 636 |
| 619 // Variable length data follows here. | 637 // Variable length data follows here. |
| 620 intptr_t data_[0]; | 638 intptr_t data_[0]; |
| 621 }; | 639 }; |
| 622 | 640 |
| 623 | 641 |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 intptr_t type_; // Uninitialized, simple or complex. | 918 intptr_t type_; // Uninitialized, simple or complex. |
| 901 intptr_t flags_; // Represents global/local, case insensitive, multiline. | 919 intptr_t flags_; // Represents global/local, case insensitive, multiline. |
| 902 | 920 |
| 903 // Variable length data follows here. | 921 // Variable length data follows here. |
| 904 uint8_t data_[0]; | 922 uint8_t data_[0]; |
| 905 }; | 923 }; |
| 906 | 924 |
| 907 } // namespace dart | 925 } // namespace dart |
| 908 | 926 |
| 909 #endif // VM_RAW_OBJECT_H_ | 927 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |