| 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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 RawAbstractTypeArguments* instantiator_type_arguments_; | 532 RawAbstractTypeArguments* instantiator_type_arguments_; |
| 533 RawObject** to() { | 533 RawObject** to() { |
| 534 return reinterpret_cast<RawObject**>(&ptr()->instantiator_type_arguments_); | 534 return reinterpret_cast<RawObject**>(&ptr()->instantiator_type_arguments_); |
| 535 } | 535 } |
| 536 }; | 536 }; |
| 537 | 537 |
| 538 | 538 |
| 539 class RawFunction : public RawObject { | 539 class RawFunction : public RawObject { |
| 540 public: | 540 public: |
| 541 enum Kind { | 541 enum Kind { |
| 542 kFunction, | 542 kRegularFunction, |
| 543 kClosureFunction, | 543 kClosureFunction, |
| 544 kSignatureFunction, // represents a signature only without actual code. | 544 kSignatureFunction, // represents a signature only without actual code. |
| 545 kGetterFunction, // represents getter functions e.g: get foo() { .. }. | 545 kGetterFunction, // represents getter functions e.g: get foo() { .. }. |
| 546 kSetterFunction, // represents setter functions e.g: set foo(..) { .. }. | 546 kSetterFunction, // represents setter functions e.g: set foo(..) { .. }. |
| 547 kAbstract, | 547 kAbstract, |
| 548 kConstructor, | 548 kConstructor, |
| 549 kImplicitGetter, // represents an implicit getter for fields. | 549 kImplicitGetter, // represents an implicit getter for fields. |
| 550 kImplicitSetter, // represents an implicit setter for fields. | 550 kImplicitSetter, // represents an implicit setter for fields. |
| 551 kConstImplicitGetter, // represents an implicit const getter for fields. | 551 kConstImplicitGetter, // represents an implicit const getter for fields. |
| 552 }; | 552 }; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 // Variable length data follows here. | 634 // Variable length data follows here. |
| 635 uint8_t data_[0]; | 635 uint8_t data_[0]; |
| 636 | 636 |
| 637 friend class SnapshotReader; | 637 friend class SnapshotReader; |
| 638 }; | 638 }; |
| 639 | 639 |
| 640 | 640 |
| 641 class RawScript : public RawObject { | 641 class RawScript : public RawObject { |
| 642 public: | 642 public: |
| 643 enum Kind { | 643 enum Kind { |
| 644 kScript = 0, | 644 kScriptTag = 0, |
| 645 kLibrary, | 645 kLibraryTag, |
| 646 kSource | 646 kSourceTag |
| 647 }; | 647 }; |
| 648 | 648 |
| 649 private: | 649 private: |
| 650 RAW_HEAP_OBJECT_IMPLEMENTATION(Script); | 650 RAW_HEAP_OBJECT_IMPLEMENTATION(Script); |
| 651 | 651 |
| 652 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->url_); } | 652 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->url_); } |
| 653 RawString* url_; | 653 RawString* url_; |
| 654 RawString* source_; | 654 RawString* source_; |
| 655 RawTokenStream* tokens_; | 655 RawTokenStream* tokens_; |
| 656 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->tokens_); } | 656 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->tokens_); } |
| (...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1516 kExternalUint64Array == kByteArray + 18 && | 1516 kExternalUint64Array == kByteArray + 18 && |
| 1517 kExternalFloat32Array == kByteArray + 19 && | 1517 kExternalFloat32Array == kByteArray + 19 && |
| 1518 kExternalFloat64Array == kByteArray + 20 && | 1518 kExternalFloat64Array == kByteArray + 20 && |
| 1519 kClosure == kByteArray + 21); | 1519 kClosure == kByteArray + 21); |
| 1520 return (index >= kByteArray && index <= kClosure); | 1520 return (index >= kByteArray && index <= kClosure); |
| 1521 } | 1521 } |
| 1522 | 1522 |
| 1523 } // namespace dart | 1523 } // namespace dart |
| 1524 | 1524 |
| 1525 #endif // VM_RAW_OBJECT_H_ | 1525 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |