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

Unified Diff: src/v8natives.js

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/runtime.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index a522738b881b9042f4a3cc0a44e3ec76e022229e..405e7d6790932b66b473ff83478f504363ca7894 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -1757,7 +1757,12 @@ function FunctionSourceString(func) {
var name = %FunctionNameShouldPrintAsAnonymous(func)
? 'anonymous'
: %FunctionGetName(func);
- var head = %FunctionIsGenerator(func) ? 'function* ' : 'function ';
+
+ // TODO(arv): Handle concise generator methods.
+
+ var head = %FunctionIsConciseMethod(func)
+ ? ''
+ : %FunctionIsGenerator(func) ? 'function* ' : 'function ';
return head + name + source;
}
« no previous file with comments | « src/runtime.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698