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

Unified Diff: src/globals.h

Issue 577973002: ES6: Implement generator method shorthand (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Cleanup based on code review 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 | « no previous file | src/preparser.h » ('j') | test/cctest/test-parsing.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/globals.h
diff --git a/src/globals.h b/src/globals.h
index 55bb57289d9018f35d9bf78037230556bae7ea50..3eb95c644ca425ae6455014e531575a6d7ffe65f 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -761,17 +761,17 @@ enum FunctionKind {
kNormalFunction = 0,
kArrowFunction = 1,
kGeneratorFunction = 2,
- kConciseMethod = 4
+ kConciseMethod = 4,
+ kConciseGeneratorMethod = kGeneratorFunction | kConciseMethod
};
inline bool IsValidFunctionKind(FunctionKind kind) {
- // At the moment these are mutually exclusive but in the future that wont be
- // the case since ES6 allows concise generator methods.
return kind == FunctionKind::kNormalFunction ||
kind == FunctionKind::kArrowFunction ||
kind == FunctionKind::kGeneratorFunction ||
- kind == FunctionKind::kConciseMethod;
+ kind == FunctionKind::kConciseMethod ||
+ kind == FunctionKind::kConciseGeneratorMethod;
}
« no previous file with comments | « no previous file | src/preparser.h » ('j') | test/cctest/test-parsing.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698