diff options
author | Myles Borins <mylesborins@google.com> | 2018-04-10 21:39:51 -0400 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2018-04-11 13:22:42 -0400 |
commit | 12a1b9b8049462e47181a298120243dc83e81c55 (patch) | |
tree | 8605276308c8b4e3597516961266bae1af57557a /deps/v8/src/globals.h | |
parent | 78cd8263354705b767ef8c6a651740efe4931ba0 (diff) | |
download | android-node-v8-12a1b9b8049462e47181a298120243dc83e81c55.tar.gz android-node-v8-12a1b9b8049462e47181a298120243dc83e81c55.tar.bz2 android-node-v8-12a1b9b8049462e47181a298120243dc83e81c55.zip |
deps: update V8 to 6.6.346.23
PR-URL: https://github.com/nodejs/node/pull/19201
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/v8/src/globals.h')
-rw-r--r-- | deps/v8/src/globals.h | 241 |
1 files changed, 102 insertions, 139 deletions
diff --git a/deps/v8/src/globals.h b/deps/v8/src/globals.h index bc28181db1..7ffbf99d61 100644 --- a/deps/v8/src/globals.h +++ b/deps/v8/src/globals.h @@ -470,6 +470,7 @@ class FreeStoreAllocationPolicy; class FunctionTemplateInfo; class MemoryChunk; class NumberDictionary; +class SimpleNumberDictionary; class NameDictionary; class GlobalDictionary; template <typename T> class MaybeHandle; @@ -538,25 +539,6 @@ enum AllocationAlignment { kWordAligned, kDoubleAligned, kDoubleUnaligned }; enum class AccessMode { ATOMIC, NON_ATOMIC }; -// Possible outcomes for decisions. -enum class Decision : uint8_t { kUnknown, kTrue, kFalse }; - -inline size_t hash_value(Decision decision) { - return static_cast<uint8_t>(decision); -} - -inline std::ostream& operator<<(std::ostream& os, Decision decision) { - switch (decision) { - case Decision::kUnknown: - return os << "Unknown"; - case Decision::kTrue: - return os << "True"; - case Decision::kFalse: - return os << "False"; - } - UNREACHABLE(); -} - // Supported write barrier modes. enum WriteBarrierKind : uint8_t { kNoWriteBarrier, @@ -628,9 +610,6 @@ enum NativesFlag { INSPECTOR_CODE }; -// JavaScript defines two kinds of 'nil'. -enum NilValue { kNullValue, kUndefinedValue }; - // ParseRestriction is used to restrict the set of valid statements in a // unit of compilation. Restriction violations cause a syntax error. enum ParseRestriction { @@ -747,15 +726,6 @@ constexpr int kIeeeDoubleMantissaWordOffset = 4; constexpr int kIeeeDoubleExponentWordOffset = 0; #endif -// AccessorCallback -struct AccessorDescriptor { - Object* (*getter)(Isolate* isolate, Object* object, void* data); - Object* (*setter)( - Isolate* isolate, JSObject* object, Object* value, void* data); - void* data; -}; - - // ----------------------------------------------------------------------------- // Macros @@ -811,8 +781,6 @@ enum CpuFeature { MIPSr2, MIPSr6, MIPS_SIMD, // MSA instructions - // ARM64 - ALWAYS_ALIGN_CSP, // PPC FPR_GPR_MOV, LWSYNC, @@ -889,13 +857,6 @@ inline std::ostream& operator<<(std::ostream& os, CreateArgumentsType type) { UNREACHABLE(); } -// Used to specify if a macro instruction must perform a smi check on tagged -// values. -enum SmiCheckType { - DONT_DO_SMI_CHECK, - DO_SMI_CHECK -}; - enum ScopeType : uint8_t { EVAL_SCOPE, // The top-level scope for an eval source. FUNCTION_SCOPE, // The top-level scope for a function. @@ -1060,99 +1021,60 @@ enum VariableLocation : uint8_t { // immediately initialized upon creation (kCreatedInitialized). enum InitializationFlag : uint8_t { kNeedsInitialization, kCreatedInitialized }; -enum class HoleCheckMode { kRequired, kElided }; - enum MaybeAssignedFlag : uint8_t { kNotAssigned, kMaybeAssigned }; // Serialized in PreparseData, so numeric values should not be changed. enum ParseErrorType { kSyntaxError = 0, kReferenceError = 1 }; - -enum MinusZeroMode { - TREAT_MINUS_ZERO_AS_ZERO, - FAIL_ON_MINUS_ZERO -}; - - -enum Signedness { kSigned, kUnsigned }; - -enum FunctionKind : uint16_t { - kNormalFunction = 0, - kArrowFunction = 1 << 0, - kGeneratorFunction = 1 << 1, - kConciseMethod = 1 << 2, - kDefaultConstructor = 1 << 3, - kDerivedConstructor = 1 << 4, - kBaseConstructor = 1 << 5, - kGetterFunction = 1 << 6, - kSetterFunction = 1 << 7, - kAsyncFunction = 1 << 8, - kModule = 1 << 9, - kClassFieldsInitializerFunction = 1 << 10 | kConciseMethod, - kLastFunctionKind = kClassFieldsInitializerFunction, - - kConciseGeneratorMethod = kGeneratorFunction | kConciseMethod, - kAccessorFunction = kGetterFunction | kSetterFunction, - kDefaultBaseConstructor = kDefaultConstructor | kBaseConstructor, - kDefaultDerivedConstructor = kDefaultConstructor | kDerivedConstructor, - kClassConstructor = - kBaseConstructor | kDerivedConstructor | kDefaultConstructor, - kAsyncArrowFunction = kArrowFunction | kAsyncFunction, - kAsyncConciseMethod = kAsyncFunction | kConciseMethod, - - // https://tc39.github.io/proposal-async-iteration/ - kAsyncConciseGeneratorMethod = kAsyncFunction | kConciseGeneratorMethod, - kAsyncGeneratorFunction = kAsyncFunction | kGeneratorFunction +enum FunctionKind : uint8_t { + kNormalFunction, + kArrowFunction, + kGeneratorFunction, + kConciseMethod, + kDerivedConstructor, + kBaseConstructor, + kGetterFunction, + kSetterFunction, + kAsyncFunction, + kModule, + kClassFieldsInitializerFunction, + + kDefaultBaseConstructor, + kDefaultDerivedConstructor, + kAsyncArrowFunction, + kAsyncConciseMethod, + + kConciseGeneratorMethod, + kAsyncConciseGeneratorMethod, + kAsyncGeneratorFunction, + kLastFunctionKind = kAsyncGeneratorFunction, }; -inline bool IsValidFunctionKind(FunctionKind kind) { - return kind == FunctionKind::kNormalFunction || - kind == FunctionKind::kArrowFunction || - kind == FunctionKind::kGeneratorFunction || - kind == FunctionKind::kModule || - kind == FunctionKind::kConciseMethod || - kind == FunctionKind::kConciseGeneratorMethod || - kind == FunctionKind::kGetterFunction || - kind == FunctionKind::kSetterFunction || - kind == FunctionKind::kAccessorFunction || - kind == FunctionKind::kDefaultBaseConstructor || - kind == FunctionKind::kDefaultDerivedConstructor || - kind == FunctionKind::kBaseConstructor || - kind == FunctionKind::kDerivedConstructor || - kind == FunctionKind::kAsyncFunction || - kind == FunctionKind::kAsyncArrowFunction || - kind == FunctionKind::kAsyncConciseMethod || - kind == FunctionKind::kAsyncConciseGeneratorMethod || - kind == FunctionKind::kAsyncGeneratorFunction || - kind == FunctionKind::kClassFieldsInitializerFunction; -} - - inline bool IsArrowFunction(FunctionKind kind) { - DCHECK(IsValidFunctionKind(kind)); - return (kind & FunctionKind::kArrowFunction) != 0; + return kind == FunctionKind::kArrowFunction || + kind == FunctionKind::kAsyncArrowFunction; } - -inline bool IsGeneratorFunction(FunctionKind kind) { - DCHECK(IsValidFunctionKind(kind)); - return (kind & FunctionKind::kGeneratorFunction) != 0; +inline bool IsModule(FunctionKind kind) { + return kind == FunctionKind::kModule; } -inline bool IsModule(FunctionKind kind) { - DCHECK(IsValidFunctionKind(kind)); - return (kind & FunctionKind::kModule) != 0; +inline bool IsAsyncGeneratorFunction(FunctionKind kind) { + return kind == FunctionKind::kAsyncGeneratorFunction || + kind == FunctionKind::kAsyncConciseGeneratorMethod; } -inline bool IsAsyncFunction(FunctionKind kind) { - DCHECK(IsValidFunctionKind(kind)); - return (kind & FunctionKind::kAsyncFunction) != 0; +inline bool IsGeneratorFunction(FunctionKind kind) { + return kind == FunctionKind::kGeneratorFunction || + kind == FunctionKind::kConciseGeneratorMethod || + IsAsyncGeneratorFunction(kind); } -inline bool IsAsyncGeneratorFunction(FunctionKind kind) { - DCHECK(IsValidFunctionKind(kind)); - const FunctionKind kMask = FunctionKind::kAsyncGeneratorFunction; - return (kind & kMask) == kMask; +inline bool IsAsyncFunction(FunctionKind kind) { + return kind == FunctionKind::kAsyncFunction || + kind == FunctionKind::kAsyncArrowFunction || + kind == FunctionKind::kAsyncConciseMethod || + IsAsyncGeneratorFunction(kind); } inline bool IsResumableFunction(FunctionKind kind) { @@ -1160,50 +1082,47 @@ inline bool IsResumableFunction(FunctionKind kind) { } inline bool IsConciseMethod(FunctionKind kind) { - DCHECK(IsValidFunctionKind(kind)); - return (kind & FunctionKind::kConciseMethod) != 0; + return kind == FunctionKind::kConciseMethod || + kind == FunctionKind::kConciseGeneratorMethod || + kind == FunctionKind::kAsyncConciseMethod || + kind == FunctionKind::kAsyncConciseGeneratorMethod || + kind == FunctionKind::kClassFieldsInitializerFunction; } inline bool IsGetterFunction(FunctionKind kind) { - DCHECK(IsValidFunctionKind(kind)); - return (kind & FunctionKind::kGetterFunction) != 0; + return kind == FunctionKind::kGetterFunction; } inline bool IsSetterFunction(FunctionKind kind) { - DCHECK(IsValidFunctionKind(kind)); - return (kind & FunctionKind::kSetterFunction) != 0; + return kind == FunctionKind::kSetterFunction; } inline bool IsAccessorFunction(FunctionKind kind) { - DCHECK(IsValidFunctionKind(kind)); - return (kind & FunctionKind::kAccessorFunction) != 0; + return kind == FunctionKind::kGetterFunction || + kind == FunctionKind::kSetterFunction; } - inline bool IsDefaultConstructor(FunctionKind kind) { - DCHECK(IsValidFunctionKind(kind)); - return (kind & FunctionKind::kDefaultConstructor) != 0; + return kind == FunctionKind::kDefaultBaseConstructor || + kind == FunctionKind::kDefaultDerivedConstructor; } - inline bool IsBaseConstructor(FunctionKind kind) { - DCHECK(IsValidFunctionKind(kind)); - return (kind & FunctionKind::kBaseConstructor) != 0; + return kind == FunctionKind::kBaseConstructor || + kind == FunctionKind::kDefaultBaseConstructor; } inline bool IsDerivedConstructor(FunctionKind kind) { - DCHECK(IsValidFunctionKind(kind)); - return (kind & FunctionKind::kDerivedConstructor) != 0; + return kind == FunctionKind::kDerivedConstructor || + kind == FunctionKind::kDefaultDerivedConstructor; } inline bool IsClassConstructor(FunctionKind kind) { - DCHECK(IsValidFunctionKind(kind)); - return (kind & FunctionKind::kClassConstructor) != 0; + return IsBaseConstructor(kind) || IsDerivedConstructor(kind); } inline bool IsClassFieldsInitializerFunction(FunctionKind kind) { - DCHECK(IsValidFunctionKind(kind)); return kind == FunctionKind::kClassFieldsInitializerFunction; } @@ -1216,6 +1135,48 @@ inline bool IsConstructable(FunctionKind kind) { return true; } +inline std::ostream& operator<<(std::ostream& os, FunctionKind kind) { + switch (kind) { + case FunctionKind::kNormalFunction: + return os << "NormalFunction"; + case FunctionKind::kArrowFunction: + return os << "ArrowFunction"; + case FunctionKind::kGeneratorFunction: + return os << "GeneratorFunction"; + case FunctionKind::kConciseMethod: + return os << "ConciseMethod"; + case FunctionKind::kDerivedConstructor: + return os << "DerivedConstructor"; + case FunctionKind::kBaseConstructor: + return os << "BaseConstructor"; + case FunctionKind::kGetterFunction: + return os << "GetterFunction"; + case FunctionKind::kSetterFunction: + return os << "SetterFunction"; + case FunctionKind::kAsyncFunction: + return os << "AsyncFunction"; + case FunctionKind::kModule: + return os << "Module"; + case FunctionKind::kClassFieldsInitializerFunction: + return os << "ClassFieldsInitializerFunction"; + case FunctionKind::kDefaultBaseConstructor: + return os << "DefaultBaseConstructor"; + case FunctionKind::kDefaultDerivedConstructor: + return os << "DefaultDerivedConstructor"; + case FunctionKind::kAsyncArrowFunction: + return os << "AsyncArrowFunction"; + case FunctionKind::kAsyncConciseMethod: + return os << "AsyncConciseMethod"; + case FunctionKind::kConciseGeneratorMethod: + return os << "ConciseGeneratorMethod"; + case FunctionKind::kAsyncConciseGeneratorMethod: + return os << "AsyncConciseGeneratorMethod"; + case FunctionKind::kAsyncGeneratorFunction: + return os << "AsyncGeneratorFunction"; + } + UNREACHABLE(); +} + enum class InterpreterPushArgsMode : unsigned { kJSFunction, kWithFinalSpread, @@ -1406,6 +1367,8 @@ enum ExternalArrayType { kExternalFloat32Array, kExternalFloat64Array, kExternalUint8ClampedArray, + kExternalBigInt64Array, + kExternalBigUint64Array, }; struct AssemblerDebugInfo { @@ -1462,6 +1425,8 @@ inline std::ostream& operator<<(std::ostream& os, return os; } +enum class BlockingBehavior { kBlock, kDontBlock }; + enum class ConcurrencyMode { kNotConcurrent, kConcurrent }; #define FOR_EACH_ISOLATE_ADDRESS_NAME(C) \ @@ -1476,9 +1441,7 @@ enum class ConcurrencyMode { kNotConcurrent, kConcurrent }; C(PendingHandlerFP, pending_handler_fp) \ C(PendingHandlerSP, pending_handler_sp) \ C(ExternalCaughtException, external_caught_exception) \ - C(JSEntrySP, js_entry_sp) \ - C(MicrotaskQueueBailoutIndex, microtask_queue_bailout_index) \ - C(MicrotaskQueueBailoutCount, microtask_queue_bailout_count) + C(JSEntrySP, js_entry_sp) enum IsolateAddressId { #define DECLARE_ENUM(CamelName, hacker_name) k##CamelName##Address, |