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

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: Rebased after latest changes in runtime.{h,cc} Created 6 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/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 86e8f2f18f1b67231f4c101917bd765c0f793fe5..58600c2e6a7a996bb6e1cc1b02e8025e82290ae9 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -619,6 +619,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());
}
@@ -836,6 +837,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()));
@@ -1038,6 +1040,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