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

Unified Diff: runtime/vm/object.cc

Issue 1295823003: VM: Cache instructions entry point in RawFunction/RawCode. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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/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
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 73cd49cbcbf420c9fc1d93679fb659193017f27c..c7f853f8977f29d53f482261bd5f22b50ab08d76 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -5200,6 +5200,7 @@ bool Function::HasBreakpoint() const {
void Function::SetInstructions(const Code& value) const {
StorePointer(&raw_ptr()->instructions_, value.instructions());
+ StoreNonPointer(&raw_ptr()->entry_point_, value.EntryPoint());
}
void Function::AttachCode(const Code& value) const {
@@ -5220,8 +5221,7 @@ bool Function::HasCode() const {
void Function::ClearCode() const {
ASSERT(ic_data_array() == Array::null());
StorePointer(&raw_ptr()->unoptimized_code_, Code::null());
- StorePointer(&raw_ptr()->instructions_,
- Code::Handle(StubCode::LazyCompile_entry()->code()).instructions());
+ SetInstructions(Code::Handle(StubCode::LazyCompile_entry()->code()));
}
« 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