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

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: Implement handling of arrow functions in the parser Created 6 years, 9 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.cc » ('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 4b539897b87b94cc66abbd27c2f2931ff9fb3354..fa83c149d72abf43c67a7ce7d11ca315d84ddc1d 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -615,6 +615,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());
}
@@ -826,6 +827,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()));
@@ -1035,6 +1037,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);
SetFunctionInfo(result, literal, false, script);
« no previous file with comments | « src/ast.h ('k') | src/factory.h » ('j') | src/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698