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

Unified Diff: runtime/vm/object.cc

Issue 10912146: Finish implementing lazy deoptimization (ia32, x64). Ran tests with --deoptimize-alot. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/stub_code.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 12092)
+++ runtime/vm/object.cc (working copy)
@@ -6927,14 +6927,15 @@
const char* PcDescriptors::KindAsStr(intptr_t index) const {
switch (DescriptorKind(index)) {
- case PcDescriptors::kDeoptBefore: return "deopt-before ";
- case PcDescriptors::kDeoptAfter: return "deopt-after ";
- case PcDescriptors::kDeoptIndex: return "deopt-ix ";
- case PcDescriptors::kPatchCode: return "patch ";
- case PcDescriptors::kIcCall: return "ic-call ";
- case PcDescriptors::kFuncCall: return "fn-call ";
- case PcDescriptors::kReturn: return "return ";
- case PcDescriptors::kOther: return "other ";
+ case PcDescriptors::kDeoptBefore: return "deopt-before ";
+ case PcDescriptors::kDeoptAfter: return "deopt-after ";
+ case PcDescriptors::kDeoptIndex: return "deopt-ix ";
+ case PcDescriptors::kPatchCode: return "patch ";
+ case PcDescriptors::kLazyDeoptJump: return "lazy-deopt ";
+ case PcDescriptors::kIcCall: return "ic-call ";
+ case PcDescriptors::kFuncCall: return "fn-call ";
+ case PcDescriptors::kReturn: return "return ";
+ case PcDescriptors::kOther: return "other ";
}
UNREACHABLE();
return "";
@@ -7032,6 +7033,16 @@
}
+uword PcDescriptors::GetPcForKind(Kind kind) const {
+ for (intptr_t i = 0; i < Length(); i++) {
+ if (DescriptorKind(i) == kind) {
+ return PC(i);
+ }
+ }
+ return 0;
+}
+
+
void Stackmap::SetCode(const dart::Code& code) const {
StorePointer(&raw_ptr()->code_, code.raw());
}
@@ -7600,15 +7611,16 @@
uword Code::GetPatchCodePc() const {
const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors());
- for (intptr_t i = 0; i < descriptors.Length(); i++) {
- if (descriptors.DescriptorKind(i) == PcDescriptors::kPatchCode) {
- return descriptors.PC(i);
- }
- }
- return 0;
+ return descriptors.GetPcForKind(PcDescriptors::kPatchCode);
}
+uword Code::GetLazyDeoptPc() const {
+ const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors());
+ return descriptors.GetPcForKind(PcDescriptors::kLazyDeoptJump);
+}
+
+
bool Code::ObjectExistsInArea(intptr_t start_offset,
intptr_t end_offset) const {
for (intptr_t i = 0; i < this->pointer_offsets_length(); i++) {
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/stub_code.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698