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

Unified Diff: runtime/vm/object.cc

Issue 12213020: Remember owner class of patch code (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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/object.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 18152)
+++ runtime/vm/object.cc (working copy)
@@ -1787,9 +1787,8 @@
// Shared handles used during the iteration.
String& member_name = String::Handle();
- const Script& patch_script = Script::Handle(patch.script());
- const PatchClass& patch_class = PatchClass::Handle(
- PatchClass::New(*this, patch_script));
+ const PatchClass& patch_class =
+ PatchClass::Handle(PatchClass::New(*this, patch));
Array& orig_list = Array::Handle(functions());
intptr_t orig_len = orig_list.Length();
@@ -3246,10 +3245,10 @@
RawPatchClass* PatchClass::New(const Class& patched_class,
- const Script& script) {
+ const Class& source_class) {
const PatchClass& result = PatchClass::Handle(PatchClass::New());
result.set_patched_class(patched_class);
- result.set_script(script);
+ result.set_source_class(source_class);
return result.raw();
}
@@ -3263,13 +3262,19 @@
}
+RawScript* PatchClass::Script() const {
+ const Class& source_class = Class::Handle(this->source_class());
+ return source_class.script();
+}
+
+
void PatchClass::set_patched_class(const Class& value) const {
StorePointer(&raw_ptr()->patched_class_, value.raw());
}
-void PatchClass::set_script(const Script& value) const {
- StorePointer(&raw_ptr()->script_, value.raw());
+void PatchClass::set_source_class(const Class& value) const {
+ StorePointer(&raw_ptr()->source_class_, value.raw());
}
@@ -4375,7 +4380,7 @@
return Class::Cast(obj).script();
}
ASSERT(obj.IsPatchClass());
- return PatchClass::Cast(obj).script();
+ return PatchClass::Cast(obj).Script();
}
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698