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

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: Created 6 years, 4 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
« src/ast.h ('K') | « 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 e496aee62d6760f3f13325fe5e84147aa1b7a91d..62c0362a509580dc8b32d851b2782bd6542214fb 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -662,6 +662,7 @@ static void SetFunctionInfo(Handle<SharedFunctionInfo> function_info,
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_is_concise_method(lit->is_concise_method());
}
@@ -878,7 +879,7 @@ static Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
DCHECK(!info->code().is_null());
result = isolate->factory()->NewSharedFunctionInfo(
lit->name(), lit->materialized_literal_count(), lit->is_generator(),
- lit->is_arrow(), info->code(),
+ lit->is_arrow(), lit->is_concise_method(), info->code(),
ScopeInfo::Create(info->scope(), info->zone()),
info->feedback_vector());
@@ -1101,7 +1102,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,
+ literal->is_generator(), literal->is_arrow(),
+ literal->is_concise_method(), info.code(), scope_info,
info.feedback_vector());
SetFunctionInfo(result, literal, false, script);
RecordFunctionCompilation(Logger::FUNCTION_TAG, &info, result);
« src/ast.h ('K') | « src/code-stubs-hydrogen.cc ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698