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

Unified Diff: src/compiler.cc

Issue 160073006: Implement handling of arrow functions in the parser (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Extra parens in parameter lists now recognized, no longer segfaults on "()" Created 6 years, 7 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/factory.h » ('j') | src/parser.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 6e5a3ad9affac05b7aa63a4699b00f3ee4c343f2..f459b85c38260d0874483a0d78f785d76df79044 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -605,6 +605,7 @@ static void SetFunctionInfo(Handle<SharedFunctionInfo> function_info,
function_info->set_dont_inline(lit->flags()->Contains(kDontInline));
function_info->set_dont_cache(lit->flags()->Contains(kDontCache));
function_info->set_is_generator(lit->is_generator());
+ function_info->set_is_arrow(lit->is_arrow());
}
@@ -820,6 +821,7 @@ static Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
lit->name(),
lit->materialized_literal_count(),
lit->is_generator(),
+ lit->is_arrow(),
info->code(),
ScopeInfo::Create(info->scope(), info->zone()),
info->feedback_vector());
@@ -1019,6 +1021,7 @@ Handle<SharedFunctionInfo> Compiler::BuildFunctionInfo(FunctionLiteral* literal,
factory->NewSharedFunctionInfo(literal->name(),
literal->materialized_literal_count(),
literal->is_generator(),
+ literal->is_arrow(),
info.code(),
scope_info,
info.feedback_vector());
« no previous file with comments | « src/ast.h ('k') | src/factory.h » ('j') | src/parser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698