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

Unified Diff: src/codegen.cc

Issue 62146: Add name inference for anonymous functions to facilitate debugging and profiling of JS code. (Closed)
Patch Set: updated v8_base_arm project Created 11 years, 8 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/ast.h ('k') | src/codegen-arm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen.cc
diff --git a/src/codegen.cc b/src/codegen.cc
index c8f69c734c5447576abf9a1db2ed137c44bfb7c6..a3c55d4a65ba5eb3d7887c2599308a9c0c2f75f6 100644
--- a/src/codegen.cc
+++ b/src/codegen.cc
@@ -230,7 +230,8 @@ void CodeGenerator::SetFunctionInfo(Handle<JSFunction> fun,
int end_position,
bool is_expression,
bool is_toplevel,
- Handle<Script> script) {
+ Handle<Script> script,
+ Handle<String> inferred_name) {
fun->shared()->set_length(length);
fun->shared()->set_formal_parameter_count(length);
fun->shared()->set_script(*script);
@@ -239,6 +240,7 @@ void CodeGenerator::SetFunctionInfo(Handle<JSFunction> fun,
fun->shared()->set_end_position(end_position);
fun->shared()->set_is_expression(is_expression);
fun->shared()->set_is_toplevel(is_toplevel);
+ fun->shared()->set_inferred_name(*inferred_name);
}
@@ -299,7 +301,8 @@ Handle<JSFunction> CodeGenerator::BuildBoilerplate(FunctionLiteral* node) {
CodeGenerator::SetFunctionInfo(function, node->num_parameters(),
node->function_token_position(),
node->start_position(), node->end_position(),
- node->is_expression(), false, script_);
+ node->is_expression(), false, script_,
+ node->inferred_name());
// Notify debugger that a new function has been added.
Debugger::OnNewFunction(function);
« no previous file with comments | « src/ast.h ('k') | src/codegen-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698