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

Unified Diff: src/compiler.cc

Issue 477263002: ES6: Add support for method shorthand in object literals (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: merge Created 6 years, 3 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/code-stubs-hydrogen.cc ('k') | src/contexts.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 e0c8ae3d25ef9b0ca5be9194010e3b1235781f20..162c65bc3e5c99f217e4140b6d33b072b00d9b56 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -654,8 +654,7 @@ static void SetFunctionInfo(Handle<SharedFunctionInfo> function_info,
function_info->set_is_function(lit->is_function());
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());
+ function_info->set_kind(lit->kind());
}
@@ -871,9 +870,8 @@ static Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
// Allocate function.
DCHECK(!info->code().is_null());
result = isolate->factory()->NewSharedFunctionInfo(
- lit->name(), lit->materialized_literal_count(), lit->is_generator(),
- lit->is_arrow(), info->code(),
- ScopeInfo::Create(info->scope(), info->zone()),
+ lit->name(), lit->materialized_literal_count(), lit->kind(),
+ info->code(), ScopeInfo::Create(info->scope(), info->zone()),
info->feedback_vector());
DCHECK_EQ(RelocInfo::kNoPosition, lit->function_token_position());
@@ -1094,9 +1092,8 @@ Handle<SharedFunctionInfo> Compiler::BuildFunctionInfo(
// Create a shared function info object.
Handle<SharedFunctionInfo> result = factory->NewSharedFunctionInfo(
- literal->name(), literal->materialized_literal_count(),
- literal->is_generator(), literal->is_arrow(), info.code(), scope_info,
- info.feedback_vector());
+ literal->name(), literal->materialized_literal_count(), literal->kind(),
+ 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/code-stubs-hydrogen.cc ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698