diff options
author | Michaƫl Zasso <targos@protonmail.com> | 2018-01-24 20:16:06 +0100 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2018-01-24 15:02:20 -0800 |
commit | 4c4af643e5042d615a60c6bbc05aee9d81b903e5 (patch) | |
tree | 3fb0a97988fe4439ae3ae06f26915d1dcf8cab92 /deps/v8/src/globals.h | |
parent | fa9f31a4fda5a3782c652e56e394465805ebb50f (diff) | |
download | android-node-v8-4c4af643e5042d615a60c6bbc05aee9d81b903e5.tar.gz android-node-v8-4c4af643e5042d615a60c6bbc05aee9d81b903e5.tar.bz2 android-node-v8-4c4af643e5042d615a60c6bbc05aee9d81b903e5.zip |
deps: update V8 to 6.4.388.40
PR-URL: https://github.com/nodejs/node/pull/17489
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'deps/v8/src/globals.h')
-rw-r--r-- | deps/v8/src/globals.h | 121 |
1 files changed, 74 insertions, 47 deletions
diff --git a/deps/v8/src/globals.h b/deps/v8/src/globals.h index c98f55f02f..8f5253016f 100644 --- a/deps/v8/src/globals.h +++ b/deps/v8/src/globals.h @@ -8,6 +8,7 @@ #include <stddef.h> #include <stdint.h> +#include <limits> #include <ostream> #include "src/base/build_config.h" @@ -41,21 +42,7 @@ #endif // V8_OS_WIN -// Unfortunately, the INFINITY macro cannot be used with the '-pedantic' -// warning flag and certain versions of GCC due to a bug: -// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11931 -// For now, we use the more involved template-based version from <limits>, but -// only when compiling with GCC versions affected by the bug (2.96.x - 4.0.x) -#if V8_CC_GNU && V8_GNUC_PREREQ(2, 96, 0) && !V8_GNUC_PREREQ(4, 1, 0) -# include <limits> // NOLINT -# define V8_INFINITY std::numeric_limits<double>::infinity() -#elif V8_LIBC_MSVCRT -# define V8_INFINITY HUGE_VAL -#elif V8_OS_AIX -#define V8_INFINITY (__builtin_inff()) -#else -# define V8_INFINITY INFINITY -#endif +#define V8_INFINITY std::numeric_limits<double>::infinity() namespace v8 { @@ -161,8 +148,10 @@ const int kMinUInt16 = 0; const uint32_t kMaxUInt32 = 0xFFFFFFFFu; const int kMinUInt32 = 0; +const int kUInt8Size = sizeof(uint8_t); const int kCharSize = sizeof(char); const int kShortSize = sizeof(short); // NOLINT +const int kUInt16Size = sizeof(uint16_t); const int kIntSize = sizeof(int); const int kInt32Size = sizeof(int32_t); const int kInt64Size = sizeof(int64_t); @@ -188,6 +177,7 @@ const int kElidedFrameSlots = 0; #endif const int kDoubleSizeLog2 = 3; +const size_t kMaxWasmCodeMemory = 256 * MB; #if V8_HOST_ARCH_64_BIT const int kPointerSizeLog2 = 3; @@ -314,45 +304,53 @@ F FUNCTION_CAST(Address addr) { // ----------------------------------------------------------------------------- -// Forward declarations for frequently used classes -// (sorted alphabetically) - -class FreeStoreAllocationPolicy; -template <typename T, class P = FreeStoreAllocationPolicy> class List; - -// ----------------------------------------------------------------------------- // Declarations for use in both the preparser and the rest of V8. // The Strict Mode (ECMA-262 5th edition, 4.2.2). -enum LanguageMode : uint32_t { SLOPPY, STRICT, LANGUAGE_END }; +enum class LanguageMode : bool { kSloppy, kStrict }; +static const size_t LanguageModeSize = 2; + +inline size_t hash_value(LanguageMode mode) { + return static_cast<size_t>(mode); +} inline std::ostream& operator<<(std::ostream& os, const LanguageMode& mode) { switch (mode) { - case SLOPPY: return os << "sloppy"; - case STRICT: return os << "strict"; - case LANGUAGE_END: - UNREACHABLE(); + case LanguageMode::kSloppy: + return os << "sloppy"; + case LanguageMode::kStrict: + return os << "strict"; } UNREACHABLE(); } inline bool is_sloppy(LanguageMode language_mode) { - return language_mode == SLOPPY; + return language_mode == LanguageMode::kSloppy; } inline bool is_strict(LanguageMode language_mode) { - return language_mode != SLOPPY; + return language_mode != LanguageMode::kSloppy; } inline bool is_valid_language_mode(int language_mode) { - return language_mode == SLOPPY || language_mode == STRICT; + return language_mode == static_cast<int>(LanguageMode::kSloppy) || + language_mode == static_cast<int>(LanguageMode::kStrict); } inline LanguageMode construct_language_mode(bool strict_bit) { return static_cast<LanguageMode>(strict_bit); } +// Return kStrict if either of the language modes is kStrict, or kSloppy +// otherwise. +inline LanguageMode stricter_language_mode(LanguageMode mode1, + LanguageMode mode2) { + STATIC_ASSERT(LanguageModeSize == 2); + return static_cast<LanguageMode>(static_cast<int>(mode1) | + static_cast<int>(mode2)); +} + enum TypeofMode : int { INSIDE_TYPEOF, NOT_INSIDE_TYPEOF }; // This constant is used as an undefined value when passing source positions. @@ -466,11 +464,9 @@ const uint32_t kQuietNaNHighBitsMask = 0xfff << (51 - 32); // Forward declarations for frequently used classes class AccessorInfo; -class Allocation; class Arguments; class Assembler; class Code; -class CodeGenerator; class CodeStub; class Context; class Debug; @@ -480,10 +476,10 @@ class DescriptorArray; class TransitionArray; class ExternalReference; class FixedArray; +class FreeStoreAllocationPolicy; class FunctionTemplateInfo; class MemoryChunk; -class SeededNumberDictionary; -class UnseededNumberDictionary; +class NumberDictionary; class NameDictionary; class GlobalDictionary; template <typename T> class MaybeHandle; @@ -623,6 +619,8 @@ enum GarbageCollector { SCAVENGER, MARK_COMPACTOR, MINOR_MARK_COMPACTOR }; enum Executability { NOT_EXECUTABLE, EXECUTABLE }; +enum Movability { kMovable, kImmovable }; + enum VisitMode { VISIT_ALL, VISIT_ALL_IN_MINOR_MC_MARK, @@ -631,7 +629,6 @@ enum VisitMode { VISIT_ALL_IN_SWEEP_NEWSPACE, VISIT_ONLY_STRONG, VISIT_ONLY_STRONG_FOR_SERIALIZATION, - VISIT_ONLY_STRONG_ROOT_LIST, }; // Flag indicating whether code is built into the VM (one of the natives files). @@ -713,6 +710,8 @@ enum WhereToStart { kStartAtReceiver, kStartAtPrototype }; enum ResultSentinel { kNotFound = -1, kUnsupported = -2 }; +enum ShouldThrow { kThrowOnError, kDontThrow }; + // The Store Buffer (GC). typedef enum { kStoreBufferFullEvent, @@ -1299,6 +1298,34 @@ class CompareOperationFeedback { }; }; +enum class Operation { + // Binary operations. + kAdd, + kSubtract, + kMultiply, + kDivide, + kModulus, + kExponentiate, + kBitwiseAnd, + kBitwiseOr, + kBitwiseXor, + kShiftLeft, + kShiftRight, + kShiftRightLogical, + // Unary operations. + kBitwiseNot, + kNegate, + kIncrement, + kDecrement, + // Compare operations. + kEqual, + kStrictEqual, + kLessThan, + kLessThanOrEqual, + kGreaterThan, + kGreaterThanOrEqual, +}; + // Type feedback is encoded in such a way that, we can combine the feedback // at different points by performing an 'OR' operation. Type feedback moves // to a more generic type when we combine feedback. @@ -1416,18 +1443,18 @@ inline std::ostream& operator<<(std::ostream& os, enum class ConcurrencyMode { kNotConcurrent, kConcurrent }; -#define FOR_EACH_ISOLATE_ADDRESS_NAME(C) \ - C(Handler, handler) \ - C(CEntryFP, c_entry_fp) \ - C(CFunction, c_function) \ - C(Context, context) \ - C(PendingException, pending_exception) \ - C(PendingHandlerContext, pending_handler_context) \ - C(PendingHandlerCode, pending_handler_code) \ - C(PendingHandlerOffset, pending_handler_offset) \ - C(PendingHandlerFP, pending_handler_fp) \ - C(PendingHandlerSP, pending_handler_sp) \ - C(ExternalCaughtException, external_caught_exception) \ +#define FOR_EACH_ISOLATE_ADDRESS_NAME(C) \ + C(Handler, handler) \ + C(CEntryFP, c_entry_fp) \ + C(CFunction, c_function) \ + C(Context, context) \ + C(PendingException, pending_exception) \ + C(PendingHandlerContext, pending_handler_context) \ + C(PendingHandlerEntrypoint, pending_handler_entrypoint) \ + C(PendingHandlerConstantPool, pending_handler_constant_pool) \ + C(PendingHandlerFP, pending_handler_fp) \ + C(PendingHandlerSP, pending_handler_sp) \ + C(ExternalCaughtException, external_caught_exception) \ C(JSEntrySP, js_entry_sp) enum IsolateAddressId { |