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

Unified Diff: src/runtime/runtime-debug.cc

Issue 678843004: Use shared function info for eval cache key. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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/runtime/runtime-compiler.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-debug.cc
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc
index 969ddaf8a18ce42aaf5a17760004dcf170ae44bb..15551066e99bbe65df986880728f3e754df837e3 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -2043,6 +2043,7 @@ MUST_USE_RESULT static MaybeHandle<JSObject> MaterializeArgumentsObject(
// Compile and evaluate source for the given context.
static MaybeHandle<Object> DebugEvaluate(Isolate* isolate,
+ Handle<SharedFunctionInfo> outer_info,
Handle<Context> context,
Handle<Object> context_extension,
Handle<Object> receiver,
@@ -2054,11 +2055,11 @@ static MaybeHandle<Object> DebugEvaluate(Isolate* isolate,
}
Handle<JSFunction> eval_fun;
- ASSIGN_RETURN_ON_EXCEPTION(
- isolate, eval_fun, Compiler::GetFunctionFromEval(source, context, SLOPPY,
- NO_PARSE_RESTRICTION,
- RelocInfo::kNoPosition),
- Object);
+ ASSIGN_RETURN_ON_EXCEPTION(isolate, eval_fun,
+ Compiler::GetFunctionFromEval(
+ source, outer_info, context, SLOPPY,
+ NO_PARSE_RESTRICTION, RelocInfo::kNoPosition),
+ Object);
Handle<Object> result;
ASSIGN_RETURN_ON_EXCEPTION(
@@ -2118,6 +2119,7 @@ RUNTIME_FUNCTION(Runtime_DebugEvaluate) {
JavaScriptFrame* frame = it.frame();
FrameInspector frame_inspector(frame, inlined_jsframe_index, isolate);
Handle<JSFunction> function(JSFunction::cast(frame_inspector.GetFunction()));
+ Handle<SharedFunctionInfo> outer_info(function->shared());
// Traverse the saved contexts chain to find the active context for the
// selected frame.
@@ -2177,8 +2179,8 @@ RUNTIME_FUNCTION(Runtime_DebugEvaluate) {
}
Handle<Object> receiver(frame->receiver(), isolate);
- MaybeHandle<Object> maybe_result =
- DebugEvaluate(isolate, eval_context, context_extension, receiver, source);
+ MaybeHandle<Object> maybe_result = DebugEvaluate(
+ isolate, outer_info, eval_context, context_extension, receiver, source);
// Remove with-context if it was inserted in between.
if (!inner_context.is_null()) inner_context->set_previous(*function_context);
@@ -2224,10 +2226,11 @@ RUNTIME_FUNCTION(Runtime_DebugEvaluateGlobal) {
// debugger was invoked.
Handle<Context> context = isolate->native_context();
Handle<JSObject> receiver(context->global_proxy());
+ Handle<SharedFunctionInfo> outer_info(context->closure()->shared(), isolate);
Handle<Object> result;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
- isolate, result,
- DebugEvaluate(isolate, context, context_extension, receiver, source));
+ isolate, result, DebugEvaluate(isolate, outer_info, context,
+ context_extension, receiver, source));
return *result;
}
« no previous file with comments | « src/runtime/runtime-compiler.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698