diff options
Diffstat (limited to 'deps/v8/src/globals.h')
-rw-r--r-- | deps/v8/src/globals.h | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/deps/v8/src/globals.h b/deps/v8/src/globals.h index c3358870e5..67bdb63b86 100644 --- a/deps/v8/src/globals.h +++ b/deps/v8/src/globals.h @@ -599,19 +599,6 @@ enum InlineCacheState { }; -enum CallConstructorFlags { - NO_CALL_CONSTRUCTOR_FLAGS = 0, - // The call target is cached in the instruction stream. - RECORD_CONSTRUCTOR_TARGET = 1, - // TODO(bmeurer): Kill these SUPER_* modes and use the Construct builtin - // directly instead; also there's no point in collecting any "targets" for - // super constructor calls, since these are known when we optimize the - // constructor that contains the super call. - SUPER_CONSTRUCTOR_CALL = 1 << 1, - SUPER_CALL_RECORD_TARGET = SUPER_CONSTRUCTOR_CALL | RECORD_CONSTRUCTOR_TARGET -}; - - enum CacheHolderFlag { kCacheOnPrototype, kCacheOnPrototypeReceiverIsDictionary, @@ -1035,6 +1022,15 @@ inline bool IsClassConstructor(FunctionKind kind) { } +inline bool IsConstructable(FunctionKind kind, LanguageMode mode) { + if (IsAccessorFunction(kind)) return false; + if (IsConciseMethod(kind) && !IsGeneratorFunction(kind)) return false; + if (IsArrowFunction(kind)) return false; + if (is_strong(mode)) return IsClassConstructor(kind); + return true; +} + + inline bool IsInObjectLiteral(FunctionKind kind) { DCHECK(IsValidFunctionKind(kind)); return kind & FunctionKind::kInObjectLiteral; |