Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: runtime/vm/raw_object.h

Issue 2349593003: Support generic method syntax (fixes #25869). (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/atomic.h" 9 #include "vm/atomic.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 834
835 uword entry_point_; // Accessed from generated code. 835 uword entry_point_; // Accessed from generated code.
836 836
837 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } 837 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
838 RawString* name_; 838 RawString* name_;
839 RawObject* owner_; // Class or patch class or mixin class 839 RawObject* owner_; // Class or patch class or mixin class
840 // where this function is defined. 840 // where this function is defined.
841 RawAbstractType* result_type_; 841 RawAbstractType* result_type_;
842 RawArray* parameter_types_; 842 RawArray* parameter_types_;
843 RawArray* parameter_names_; 843 RawArray* parameter_names_;
844 RawTypeArguments* type_parameters_; // Array of TypeParameter.
844 RawObject* data_; // Additional data specific to the function kind. 845 RawObject* data_; // Additional data specific to the function kind.
845 RawObject** to_snapshot() { 846 RawObject** to_snapshot() {
846 return reinterpret_cast<RawObject**>(&ptr()->data_); 847 return reinterpret_cast<RawObject**>(&ptr()->data_);
847 } 848 }
848 RawArray* ic_data_array_; // ICData of unoptimized code. 849 RawArray* ic_data_array_; // ICData of unoptimized code.
849 RawObject** to_no_code() { 850 RawObject** to_no_code() {
850 return reinterpret_cast<RawObject**>(&ptr()->ic_data_array_); 851 return reinterpret_cast<RawObject**>(&ptr()->ic_data_array_);
851 } 852 }
852 RawCode* code_; // Currently active code. Accessed from generated code. 853 RawCode* code_; // Currently active code. Accessed from generated code.
853 NOT_IN_PRECOMPILED(RawCode* unoptimized_code_); // Unoptimized code, keep it 854 NOT_IN_PRECOMPILED(RawCode* unoptimized_code_); // Unoptimized code, keep it
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 class RawTypeParameter : public RawAbstractType { 1741 class RawTypeParameter : public RawAbstractType {
1741 private: 1742 private:
1742 RAW_HEAP_OBJECT_IMPLEMENTATION(TypeParameter); 1743 RAW_HEAP_OBJECT_IMPLEMENTATION(TypeParameter);
1743 1744
1744 RawObject** from() { 1745 RawObject** from() {
1745 return reinterpret_cast<RawObject**>(&ptr()->name_); 1746 return reinterpret_cast<RawObject**>(&ptr()->name_);
1746 } 1747 }
1747 RawString* name_; 1748 RawString* name_;
1748 RawSmi* hash_; 1749 RawSmi* hash_;
1749 RawAbstractType* bound_; // ObjectType if no explicit bound specified. 1750 RawAbstractType* bound_; // ObjectType if no explicit bound specified.
1750 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->bound_); } 1751 RawFunction* parameterized_function_;
1752 RawObject** to() {
1753 return reinterpret_cast<RawObject**>(&ptr()->parameterized_function_);
1754 }
1751 classid_t parameterized_class_id_; 1755 classid_t parameterized_class_id_;
1752 TokenPosition token_pos_; 1756 TokenPosition token_pos_;
1753 int16_t index_; 1757 int16_t index_;
1758 uint8_t parent_level_; // Max 255 levels of nested generic functions is OK.
1754 int8_t type_state_; 1759 int8_t type_state_;
1755 1760
1756 friend class CidRewriteVisitor; 1761 friend class CidRewriteVisitor;
1757 }; 1762 };
1758 1763
1759 1764
1760 class RawBoundedType : public RawAbstractType { 1765 class RawBoundedType : public RawAbstractType {
1761 private: 1766 private:
1762 RAW_HEAP_OBJECT_IMPLEMENTATION(BoundedType); 1767 RAW_HEAP_OBJECT_IMPLEMENTATION(BoundedType);
1763 1768
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
2466 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == 2471 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
2467 kTypedDataInt8ArrayViewCid + 15); 2472 kTypedDataInt8ArrayViewCid + 15);
2468 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); 2473 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
2469 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); 2474 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
2470 return (kNullCid - kTypedDataInt8ArrayCid); 2475 return (kNullCid - kTypedDataInt8ArrayCid);
2471 } 2476 }
2472 2477
2473 } // namespace dart 2478 } // namespace dart
2474 2479
2475 #endif // VM_RAW_OBJECT_H_ 2480 #endif // VM_RAW_OBJECT_H_
OLDNEW
« runtime/vm/parser.cc ('K') | « runtime/vm/parser.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698