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

Unified Diff: src/globals.h

Issue 700523003: Classes: Partial fix for constructor not calling super (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove todo Created 6 years, 1 month 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/full-codegen.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
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 c6ba010fc5ff0851e0de43e0776e59e912b38ca3..7fa43174d4a857a9895a753e0a579dc1e3998f07 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -776,7 +776,9 @@ enum FunctionKind {
kArrowFunction = 1,
kGeneratorFunction = 2,
kConciseMethod = 4,
- kConciseGeneratorMethod = kGeneratorFunction | kConciseMethod
+ kConciseGeneratorMethod = kGeneratorFunction | kConciseMethod,
+ kDefaultConstructor = 8,
+ kDefaultConstructorCallSuper = 16
};
@@ -785,7 +787,9 @@ inline bool IsValidFunctionKind(FunctionKind kind) {
kind == FunctionKind::kArrowFunction ||
kind == FunctionKind::kGeneratorFunction ||
kind == FunctionKind::kConciseMethod ||
- kind == FunctionKind::kConciseGeneratorMethod;
+ kind == FunctionKind::kConciseGeneratorMethod ||
+ kind == FunctionKind::kDefaultConstructor ||
+ kind == FunctionKind::kDefaultConstructorCallSuper;
}
@@ -805,6 +809,18 @@ inline bool IsConciseMethod(FunctionKind kind) {
DCHECK(IsValidFunctionKind(kind));
return kind & FunctionKind::kConciseMethod;
}
+
+
+inline bool IsDefaultConstructor(FunctionKind kind) {
+ DCHECK(IsValidFunctionKind(kind));
+ return kind & FunctionKind::kDefaultConstructor;
+}
+
+
+inline bool IsDefaultConstructorCallSuper(FunctionKind kind) {
+ DCHECK(IsValidFunctionKind(kind));
+ return kind & FunctionKind::kDefaultConstructorCallSuper;
+}
} } // namespace v8::internal
namespace i = v8::internal;
« no previous file with comments | « src/full-codegen.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698