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

Unified Diff: dart/runtime/vm/object.cc

Issue 328663002: Version 1.5.0-dev.4.5 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 6 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 | « dart/runtime/vm/object.h ('k') | dart/runtime/vm/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/runtime/vm/object.cc
===================================================================
--- dart/runtime/vm/object.cc (revision 37111)
+++ dart/runtime/vm/object.cc (working copy)
@@ -2523,6 +2523,13 @@
if (!CodePatcher::IsEntryPatched(code)) {
CodePatcher::PatchEntry(code);
}
+ } else if (!function.HasCode() && (code.GetEntryPatchPc() != 0)) {
+ // The code has already been disconnected, make it invalid. Do not
+ // bother with OSR compiled code that has no valid entry-patch.
+ ReportSwitchingCode(code);
+ if (!CodePatcher::IsEntryPatched(code)) {
+ CodePatcher::PatchEntry(code);
+ }
}
}
}
@@ -10129,9 +10136,6 @@
const char* PcDescriptors::KindAsStr(intptr_t index) const {
switch (DescriptorKind(index)) {
case PcDescriptors::kDeopt: return "deopt ";
- case PcDescriptors::kEntryPatch: return "entry-patch ";
- case PcDescriptors::kPatchCode: return "patch ";
- case PcDescriptors::kLazyDeoptJump: return "lazy-deopt ";
case PcDescriptors::kIcCall: return "ic-call ";
case PcDescriptors::kOptStaticCall: return "opt-call ";
case PcDescriptors::kUnoptStaticCall: return "unopt-call ";
@@ -11618,6 +11622,9 @@
result.set_is_alive(false);
result.set_comments(Comments::New(0));
result.set_compile_timestamp(0);
+ result.set_entry_patch_pc_offset(kInvalidPc);
+ result.set_patch_code_pc_offset(kInvalidPc);
+ result.set_lazy_deopt_pc_offset(kInvalidPc);
result.set_pc_descriptors(Object::empty_descriptors());
}
return result.raw();
@@ -11897,15 +11904,21 @@
}
+uword Code::GetEntryPatchPc() const {
+ return (entry_patch_pc_offset() != kInvalidPc)
+ ? EntryPoint() + entry_patch_pc_offset() : 0;
+}
+
+
uword Code::GetPatchCodePc() const {
- const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors());
- return descriptors.GetPcForKind(PcDescriptors::kPatchCode);
+ return (patch_code_pc_offset() != kInvalidPc)
+ ? EntryPoint() + patch_code_pc_offset() : 0;
}
uword Code::GetLazyDeoptPc() const {
- const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors());
- return descriptors.GetPcForKind(PcDescriptors::kLazyDeoptJump);
+ return (lazy_deopt_pc_offset() != kInvalidPc)
+ ? EntryPoint() + lazy_deopt_pc_offset() : 0;
}
« no previous file with comments | « dart/runtime/vm/object.h ('k') | dart/runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698