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

Unified Diff: runtime/vm/object.cc

Issue 315583002: First step in reducing the size of PC descriptors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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 36912)
+++ runtime/vm/object.cc (working copy)
@@ -10126,9 +10126,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 ";
@@ -11615,6 +11612,9 @@
result.set_is_alive(false);
result.set_comments(Comments::New(0));
result.set_compile_timestamp(0);
+ result.set_entry_patch_pc(kInvalidPc);
+ result.set_patch_code_pc(kInvalidPc);
+ result.set_lazy_deopt_pc(kInvalidPc);
result.set_pc_descriptors(Object::empty_descriptors());
}
return result.raw();
@@ -11894,15 +11894,18 @@
}
+uword Code::GetEntryPatchPc() const {
+ return (entry_patch_pc() != kInvalidPc) ? EntryPoint() + entry_patch_pc() : 0;
+}
+
+
uword Code::GetPatchCodePc() const {
- const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors());
- return descriptors.GetPcForKind(PcDescriptors::kPatchCode);
+ return (patch_code_pc() != kInvalidPc) ? EntryPoint() + patch_code_pc() : 0;
}
uword Code::GetLazyDeoptPc() const {
- const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors());
- return descriptors.GetPcForKind(PcDescriptors::kLazyDeoptJump);
+ return (lazy_deopt_pc() != kInvalidPc) ? EntryPoint() + lazy_deopt_pc() : 0;
}

Powered by Google App Engine
This is Rietveld 408576698