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

Unified Diff: src/compiler.cc

Issue 382893003: Implement basic code generation for arrow functions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Test failures fixed, some minor corrections Created 6 years, 5 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') | no next file with comments »
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 142b315dd1404e7cea25c3b2fd06ace3561c26a2..718c0dc8fb00b5ef17ab95546612e5406305e897 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -627,6 +627,7 @@ static void SetFunctionInfo(Handle<SharedFunctionInfo> function_info,
function_info->set_bailout_reason(lit->dont_optimize_reason());
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());
}
@@ -842,10 +843,8 @@ static Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
// Allocate function.
ASSERT(!info->code().is_null());
result = isolate->factory()->NewSharedFunctionInfo(
- lit->name(),
- lit->materialized_literal_count(),
- lit->is_generator(),
- info->code(),
+ lit->name(), lit->materialized_literal_count(), lit->is_generator(),
+ lit->is_arrow(), info->code(),
ScopeInfo::Create(info->scope(), info->zone()),
info->feedback_vector());
@@ -1052,13 +1051,10 @@ Handle<SharedFunctionInfo> Compiler::BuildFunctionInfo(FunctionLiteral* literal,
}
// Create a shared function info object.
- Handle<SharedFunctionInfo> result =
- factory->NewSharedFunctionInfo(literal->name(),
- literal->materialized_literal_count(),
- literal->is_generator(),
- info.code(),
- scope_info,
- info.feedback_vector());
+ Handle<SharedFunctionInfo> result = factory->NewSharedFunctionInfo(
+ literal->name(), literal->materialized_literal_count(),
+ literal->is_generator(), literal->is_arrow(), info.code(), scope_info,
+ info.feedback_vector());
SetFunctionInfo(result, literal, false, script);
RecordFunctionCompilation(Logger::FUNCTION_TAG, &info, result);
result->set_allows_lazy_compilation(allow_lazy);
« no previous file with comments | « src/ast.h ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698