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

Unified Diff: runtime/vm/raw_object.h

Issue 3007603002: [VM generic function reification] Support generic functions in Invocation class. (Closed)
Patch Set: Created 3 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | tests/language_2/generic_no_such_method_dispatcher_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 74792a043909e258b7be46682ffdaeae1e5fe258..d11d04db3e9767e393c8ea28b4ace3b9e3960d18 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -782,37 +782,6 @@ class RawUnresolvedClass : public RawObject {
TokenPosition token_pos_;
};
-class RawTypeArguments : public RawObject {
- private:
- RAW_HEAP_OBJECT_IMPLEMENTATION(TypeArguments);
-
- RawObject** from() {
- return reinterpret_cast<RawObject**>(&ptr()->instantiations_);
- }
- // The instantiations_ array remains empty for instantiated type arguments.
- RawArray* instantiations_; // Array of paired canonical vectors:
- // Even index: instantiator.
- // Odd index: instantiated (without bound error).
- // Instantiations leading to bound errors do not get cached.
- RawSmi* length_;
-
- RawSmi* hash_;
-
- // Variable length data follows here.
- RawAbstractType* const* types() const {
- OPEN_ARRAY_START(RawAbstractType*, RawAbstractType*);
- }
- RawAbstractType** types() {
- OPEN_ARRAY_START(RawAbstractType*, RawAbstractType*);
- }
- RawObject** to(intptr_t length) {
- return reinterpret_cast<RawObject**>(&ptr()->types()[length - 1]);
- }
-
- friend class Object;
- friend class SnapshotReader;
-};
-
class RawPatchClass : public RawObject {
private:
RAW_HEAP_OBJECT_IMPLEMENTATION(PatchClass);
@@ -1692,6 +1661,37 @@ class RawLibraryPrefix : public RawInstance {
bool is_loaded_;
};
+class RawTypeArguments : public RawInstance {
+ private:
+ RAW_HEAP_OBJECT_IMPLEMENTATION(TypeArguments);
+
+ RawObject** from() {
+ return reinterpret_cast<RawObject**>(&ptr()->instantiations_);
+ }
+ // The instantiations_ array remains empty for instantiated type arguments.
+ RawArray* instantiations_; // Array of paired canonical vectors:
+ // Even index: instantiator.
+ // Odd index: instantiated (without bound error).
+ // Instantiations leading to bound errors do not get cached.
+ RawSmi* length_;
+
+ RawSmi* hash_;
+
+ // Variable length data follows here.
+ RawAbstractType* const* types() const {
+ OPEN_ARRAY_START(RawAbstractType*, RawAbstractType*);
+ }
+ RawAbstractType** types() {
+ OPEN_ARRAY_START(RawAbstractType*, RawAbstractType*);
+ }
+ RawObject** to(intptr_t length) {
+ return reinterpret_cast<RawObject**>(&ptr()->types()[length - 1]);
+ }
+
+ friend class Object;
+ friend class SnapshotReader;
+};
+
class RawAbstractType : public RawInstance {
protected:
enum TypeState {
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | tests/language_2/generic_no_such_method_dispatcher_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698