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

Unified Diff: runtime/vm/raw_object.h

Issue 10827288: - Support for patching of class methods and fields. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
Index: runtime/vm/raw_object.h
===================================================================
--- runtime/vm/raw_object.h (revision 10615)
+++ runtime/vm/raw_object.h (working copy)
@@ -24,6 +24,7 @@
V(AbstractTypeArguments) \
V(TypeArguments) \
V(InstantiatedTypeArguments) \
+ V(PatchClass) \
V(Function) \
V(Field) \
V(LiteralToken) \
@@ -540,6 +541,21 @@
};
+class RawPatchClass : public RawObject {
+ private:
+ RAW_HEAP_OBJECT_IMPLEMENTATION(PatchClass);
+
+ RawObject** from() {
+ return reinterpret_cast<RawObject**>(&ptr()->patched_class_);
+ }
+ RawClass* patched_class_;
+ RawScript* script_;
+ RawObject** to() {
+ return reinterpret_cast<RawObject**>(&ptr()->script_);
+ }
+};
+
+
class RawFunction : public RawObject {
public:
enum Kind {
@@ -559,7 +575,7 @@
RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
RawString* name_;
- RawClass* owner_;
+ RawObject* owner_; // Class or patch class where this function was defined.
RawAbstractType* result_type_;
RawArray* parameter_types_;
RawArray* parameter_names_;
« runtime/vm/parser.cc ('K') | « runtime/vm/parser.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698