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

Unified Diff: src/runtime.cc

Issue 515723004: Deoptimize context value in Turbofan (and Crankshaft). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix tests. Created 6 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 | « src/mips64/lithium-mips64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index c69882f5a36b2de7a517bfd0a79cd12eb16296fd..fa606429255957cfdfba24041ad298dd0a5da3d2 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -11193,6 +11193,9 @@ class FrameInspector {
? deoptimized_frame_->HasConstructStub()
: frame_->IsConstructor();
}
+ Object* GetContext() {
+ return is_optimized_ ? deoptimized_frame_->GetContext() : frame_->context();
+ }
// To inspect all the provided arguments the frame might need to be
// replaced with the arguments frame.
@@ -11341,7 +11344,7 @@ RUNTIME_FUNCTION(Runtime_GetFrameDetails) {
if (local < local_count) {
// Get the context containing declarations.
Handle<Context> context(
- Context::cast(it.frame()->context())->declaration_context());
+ Context::cast(frame_inspector.GetContext())->declaration_context());
for (; i < scope_info->LocalCount(); ++i) {
if (scope_info->LocalIsSynthetic(i))
continue;
@@ -13026,7 +13029,7 @@ RUNTIME_FUNCTION(Runtime_DebugEvaluate) {
isolate->set_context(*(save->context()));
// Evaluate on the context of the frame.
- Handle<Context> context(Context::cast(frame->context()));
+ Handle<Context> context(Context::cast(frame_inspector.GetContext()));
DCHECK(!context.is_null());
// Materialize stack locals and the arguments object.
« no previous file with comments | « src/mips64/lithium-mips64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698