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

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: 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
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index 00d8a88d7342222a04357665c0b4ae9f11c0501b..a18926a5aefa2da152bb864acc157048298d1bce 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -1767,7 +1767,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;
}

Powered by Google App Engine
This is Rietveld 408576698