aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/globals.h
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2016-05-27 16:37:42 +0200
committerMichaël Zasso <targos@protonmail.com>2016-06-29 09:04:28 +0200
commit2cc29517966de7257a2f1b34c58c77225a21e05d (patch)
tree210bd177df2f06eec16e1e22edafdbcbffe66f8a /deps/v8/src/globals.h
parentbbf3838c70aaec1dd296fa75ae334fd1c7866df3 (diff)
downloadandroid-node-v8-2cc29517966de7257a2f1b34c58c77225a21e05d.tar.gz
android-node-v8-2cc29517966de7257a2f1b34c58c77225a21e05d.tar.bz2
android-node-v8-2cc29517966de7257a2f1b34c58c77225a21e05d.zip
deps: update V8 to 5.1.281.69
Pick up the latest branch-head for V8 5.1. This branch brings in improved language support and performance improvements. For full details: http://v8project.blogspot.com/2016/04/v8-release-51.html * Picks up the latest branch head for 5.1 [1] * Edit v8 gitignore to allow trace_event copy * Update V8 DEP trace_event as per deps/v8/DEPS [2] [1] https://chromium.googlesource.com/v8/v8.git/+/dc81244 [2] https://chromium.googlesource.com/chromium/src/base/trace_event/common/+/c8c8665 PR-URL: https://github.com/nodejs/node/pull/7016 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/v8/src/globals.h')
-rw-r--r--deps/v8/src/globals.h104
1 files changed, 32 insertions, 72 deletions
diff --git a/deps/v8/src/globals.h b/deps/v8/src/globals.h
index be401a62ec..e7ac2b9f7f 100644
--- a/deps/v8/src/globals.h
+++ b/deps/v8/src/globals.h
@@ -59,6 +59,9 @@ namespace internal {
#if (V8_TARGET_ARCH_MIPS64 && !V8_HOST_ARCH_MIPS64)
#define USE_SIMULATOR 1
#endif
+#if (V8_TARGET_ARCH_S390 && !V8_HOST_ARCH_S390)
+#define USE_SIMULATOR 1
+#endif
#endif
// Determine whether the architecture uses an embedded constant pool
@@ -110,6 +113,7 @@ const int kMaxUInt16 = (1 << 16) - 1;
const int kMinUInt16 = 0;
const uint32_t kMaxUInt32 = 0xFFFFFFFFu;
+const int kMinUInt32 = 0;
const int kCharSize = sizeof(char); // NOLINT
const int kShortSize = sizeof(short); // NOLINT
@@ -120,6 +124,11 @@ const int kFloatSize = sizeof(float); // NOLINT
const int kDoubleSize = sizeof(double); // NOLINT
const int kIntptrSize = sizeof(intptr_t); // NOLINT
const int kPointerSize = sizeof(void*); // NOLINT
+#if V8_TARGET_ARCH_ARM64
+const int kFrameAlignmentInBytes = 2 * kPointerSize;
+#else
+const int kFrameAlignmentInBytes = kPointerSize;
+#endif
#if V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT
const int kRegisterSize = kPointerSize + kPointerSize;
#else
@@ -128,6 +137,12 @@ const int kRegisterSize = kPointerSize;
const int kPCOnStackSize = kRegisterSize;
const int kFPOnStackSize = kRegisterSize;
+#if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87
+const int kElidedFrameSlots = kPCOnStackSize / kPointerSize;
+#else
+const int kElidedFrameSlots = 0;
+#endif
+
const int kDoubleSizeLog2 = 3;
#if V8_HOST_ARCH_64_BIT
@@ -243,89 +258,36 @@ template <typename T, class P = FreeStoreAllocationPolicy> class List;
// The Strict Mode (ECMA-262 5th edition, 4.2.2).
-enum LanguageMode {
- // LanguageMode is expressed as a bitmask. Descriptions of the bits:
- STRICT_BIT = 1 << 0,
- STRONG_BIT = 1 << 1,
- LANGUAGE_END,
-
- // Shorthands for some common language modes.
- SLOPPY = 0,
- STRICT = STRICT_BIT,
- STRONG = STRICT_BIT | STRONG_BIT
-};
+enum LanguageMode { SLOPPY, STRICT, LANGUAGE_END = 3 };
inline std::ostream& operator<<(std::ostream& os, const LanguageMode& mode) {
switch (mode) {
- case SLOPPY:
- return os << "sloppy";
- case STRICT:
- return os << "strict";
- case STRONG:
- return os << "strong";
- default:
- return os << "unknown";
+ case SLOPPY: return os << "sloppy";
+ case STRICT: return os << "strict";
+ default: UNREACHABLE();
}
+ return os;
}
inline bool is_sloppy(LanguageMode language_mode) {
- return (language_mode & STRICT_BIT) == 0;
+ return language_mode == SLOPPY;
}
inline bool is_strict(LanguageMode language_mode) {
- return language_mode & STRICT_BIT;
-}
-
-
-inline bool is_strong(LanguageMode language_mode) {
- return language_mode & STRONG_BIT;
+ return language_mode != SLOPPY;
}
inline bool is_valid_language_mode(int language_mode) {
- return language_mode == SLOPPY || language_mode == STRICT ||
- language_mode == STRONG;
-}
-
-
-inline LanguageMode construct_language_mode(bool strict_bit, bool strong_bit) {
- int language_mode = 0;
- if (strict_bit) language_mode |= STRICT_BIT;
- if (strong_bit) language_mode |= STRONG_BIT;
- DCHECK(is_valid_language_mode(language_mode));
- return static_cast<LanguageMode>(language_mode);
+ return language_mode == SLOPPY || language_mode == STRICT;
}
-// Strong mode behaviour must sometimes be signalled by a two valued enum where
-// caching is involved, to prevent sloppy and strict mode from being incorrectly
-// differentiated.
-enum class Strength : bool {
- WEAK, // sloppy, strict behaviour
- STRONG // strong behaviour
-};
-
-
-inline bool is_strong(Strength strength) {
- return strength == Strength::STRONG;
-}
-
-
-inline std::ostream& operator<<(std::ostream& os, const Strength& strength) {
- return os << (is_strong(strength) ? "strong" : "weak");
-}
-
-
-inline Strength strength(LanguageMode language_mode) {
- return is_strong(language_mode) ? Strength::STRONG : Strength::WEAK;
-}
-
-
-inline size_t hash_value(Strength strength) {
- return static_cast<size_t>(strength);
+inline LanguageMode construct_language_mode(bool strict_bit) {
+ return static_cast<LanguageMode>(strict_bit);
}
@@ -525,7 +487,9 @@ enum VisitMode {
VISIT_ALL,
VISIT_ALL_IN_SCAVENGE,
VISIT_ALL_IN_SWEEP_NEWSPACE,
- VISIT_ONLY_STRONG
+ 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).
@@ -726,10 +690,13 @@ enum CpuFeature {
FPR_GPR_MOV,
LWSYNC,
ISELECT,
+ // S390
+ DISTINCT_OPS,
+ GENERAL_INSTR_EXT,
+ FLOATING_POINT_EXT,
NUMBER_OF_CPU_FEATURES
};
-
// Defines hints about receiver values based on structural knowledge.
enum class ConvertReceiverMode : unsigned {
kNullOrUndefined, // Guaranteed to be null or undefined.
@@ -959,12 +926,6 @@ enum MaybeAssignedFlag { kNotAssigned, kMaybeAssigned };
enum ParseErrorType { kSyntaxError = 0, kReferenceError = 1 };
-enum ClearExceptionFlag {
- KEEP_EXCEPTION,
- CLEAR_EXCEPTION
-};
-
-
enum MinusZeroMode {
TREAT_MINUS_ZERO_AS_ZERO,
FAIL_ON_MINUS_ZERO
@@ -1069,7 +1030,6 @@ inline bool IsConstructable(FunctionKind kind, LanguageMode mode) {
if (IsConciseMethod(kind)) return false;
if (IsArrowFunction(kind)) return false;
if (IsGeneratorFunction(kind)) return false;
- if (is_strong(mode)) return IsClassConstructor(kind);
return true;
}