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

Unified Diff: runtime/vm/raw_object.h

Issue 3007603002: [VM generic function reification] Support generic functions in Invocation class. (Closed)
Patch Set: address review comment 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') | runtime/vm/snapshot.cc » ('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..ec56555d8676f647bcf6d6c4d7e0238d4470014c 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -19,7 +19,6 @@ namespace dart {
#define CLASS_LIST_NO_OBJECT_NOR_STRING_NOR_ARRAY(V) \
V(Class) \
V(UnresolvedClass) \
- V(TypeArguments) \
V(PatchClass) \
V(Function) \
V(ClosureData) \
@@ -53,6 +52,7 @@ namespace dart {
V(UnwindError) \
V(Instance) \
V(LibraryPrefix) \
+ V(TypeArguments) \
V(AbstractType) \
V(Type) \
V(TypeRef) \
@@ -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') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698