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

Unified Diff: runtime/vm/object.cc

Issue 557913002: Allow invalidation and recompilation of instance allocation stubs. Requested in order to implement… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 40064)
+++ runtime/vm/object.cc (working copy)
@@ -3617,6 +3617,15 @@
}
+void Class::DisableAllocationStub() const {
+ const Code& alloc_stub = Code::Handle(allocation_stub());
+ if (!alloc_stub.IsNull()) {
+ CodePatcher::PatchEntry(alloc_stub);
+ StorePointer(&raw_ptr()->allocation_stub_, Code::null());
+ }
+}
+
+
bool Class::IsFunctionClass() const {
return raw() == Type::Handle(Type::Function()).type_class();
}

Powered by Google App Engine
This is Rietveld 408576698