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

Unified Diff: src/deoptimizer.cc

Issue 8492004: Fix lazy deoptimization at HInvokeFunction and enable target-recording call-function stub. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: added nop-padding and assertions on all platforms Created 9 years, 1 month 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 | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
===================================================================
--- src/deoptimizer.cc (revision 9984)
+++ src/deoptimizer.cc (working copy)
@@ -116,25 +116,11 @@
// Get the function and code from the frame.
JSFunction* function = JSFunction::cast(frame->function());
Code* code = frame->LookupCode();
- Address code_start_address = code->instruction_start();
// Locate the deoptimization point in the code. As we are at a call the
// return address must be at a place in the code with deoptimization support.
- int deoptimization_index = Safepoint::kNoDeoptimizationIndex;
- // Scope this as the safe point constructor will disallow allocation.
- {
- SafepointTable table(code);
- for (unsigned i = 0; i < table.length(); ++i) {
- Address address = code_start_address + table.GetPcOffset(i);
- if (address == frame->pc()) {
- SafepointEntry safepoint_entry = table.GetEntry(i);
- ASSERT(safepoint_entry.deoptimization_index() !=
- Safepoint::kNoDeoptimizationIndex);
- deoptimization_index = safepoint_entry.deoptimization_index();
- break;
- }
- }
- }
+ SafepointEntry safepoint_entry = code->GetSafepointEntry(frame->pc());
+ int deoptimization_index = safepoint_entry.deoptimization_index();
ASSERT(deoptimization_index != Safepoint::kNoDeoptimizationIndex);
// Always use the actual stack slots when calculating the fp to sp
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698