diff options
author | Chris Dickinson <christopher.s.dickinson@gmail.com> | 2015-05-05 13:48:55 -0700 |
---|---|---|
committer | Rod Vagg <rod@vagg.org> | 2015-08-04 11:56:09 -0700 |
commit | d58e780504bdba6c5897c48428fd984c5b5f96fe (patch) | |
tree | 033f1568ae3f9f077aceb843b42eb1ed1739ce0f /deps/v8/src/globals.h | |
parent | 21d31c08e7d0b6865e52452750b20b05e6dca443 (diff) | |
download | android-node-v8-d58e780504bdba6c5897c48428fd984c5b5f96fe.tar.gz android-node-v8-d58e780504bdba6c5897c48428fd984c5b5f96fe.tar.bz2 android-node-v8-d58e780504bdba6c5897c48428fd984c5b5f96fe.zip |
deps: update v8 to 4.3.61.21
* @indutny's SealHandleScope patch (484bebc38319fc7c622478037922ad73b2edcbf9)
has been cherry picked onto the top of V8 to make it compile.
* There's some test breakage in contextify.
* This was merged at the request of the TC.
PR-URL: https://github.com/iojs/io.js/pull/1632
Diffstat (limited to 'deps/v8/src/globals.h')
-rw-r--r-- | deps/v8/src/globals.h | 73 |
1 files changed, 56 insertions, 17 deletions
diff --git a/deps/v8/src/globals.h b/deps/v8/src/globals.h index 32396d89ea..e93fa3b07e 100644 --- a/deps/v8/src/globals.h +++ b/deps/v8/src/globals.h @@ -89,7 +89,7 @@ namespace internal { // Determine whether double field unboxing feature is enabled. #if V8_TARGET_ARCH_64_BIT -#define V8_DOUBLE_FIELDS_UNBOXING 0 +#define V8_DOUBLE_FIELDS_UNBOXING 1 #else #define V8_DOUBLE_FIELDS_UNBOXING 0 #endif @@ -408,19 +408,18 @@ typedef bool (*WeakSlotCallbackWithHeap)(Heap* heap, Object** pointer); // consecutive. // Keep this enum in sync with the ObjectSpace enum in v8.h enum AllocationSpace { - NEW_SPACE, // Semispaces collected with copying collector. - OLD_POINTER_SPACE, // May contain pointers to new space. - OLD_DATA_SPACE, // Must not have pointers to new space. - CODE_SPACE, // No pointers to new space, marked executable. - MAP_SPACE, // Only and all map objects. - CELL_SPACE, // Only and all cell objects. - PROPERTY_CELL_SPACE, // Only and all global property cell objects. - LO_SPACE, // Promoted large objects. + NEW_SPACE, // Semispaces collected with copying collector. + OLD_POINTER_SPACE, // May contain pointers to new space. + OLD_DATA_SPACE, // Must not have pointers to new space. + CODE_SPACE, // No pointers to new space, marked executable. + MAP_SPACE, // Only and all map objects. + CELL_SPACE, // Only and all cell objects. + LO_SPACE, // Promoted large objects. FIRST_SPACE = NEW_SPACE, LAST_SPACE = LO_SPACE, FIRST_PAGED_SPACE = OLD_POINTER_SPACE, - LAST_PAGED_SPACE = PROPERTY_CELL_SPACE + LAST_PAGED_SPACE = CELL_SPACE }; const int kSpaceTagSize = 3; const int kSpaceTagMask = (1 << kSpaceTagSize) - 1; @@ -452,6 +451,13 @@ enum VisitMode { enum NativesFlag { NOT_NATIVES_CODE, NATIVES_CODE }; +// ParseRestriction is used to restrict the set of valid statements in a +// unit of compilation. Restriction violations cause a syntax error. +enum ParseRestriction { + NO_PARSE_RESTRICTION, // All expressions are allowed. + ONLY_SINGLE_FUNCTION_LITERAL // Only a single FunctionLiteral expression. +}; + // A CodeDesc describes a buffer holding instructions and relocation // information. The instructions start at the beginning of the buffer // and grow forward, the relocation information starts at the end of @@ -696,9 +702,15 @@ enum ScopeType { ARROW_SCOPE // The top-level scope for an arrow function literal. }; - +// The mips architecture prior to revision 5 has inverted encoding for sNaN. +#if (V8_TARGET_ARCH_MIPS && !defined(_MIPS_ARCH_MIPS32R6)) || \ + (V8_TARGET_ARCH_MIPS64 && !defined(_MIPS_ARCH_MIPS64R6)) +const uint32_t kHoleNanUpper32 = 0xFFFF7FFF; +const uint32_t kHoleNanLower32 = 0xFFFF7FFF; +#else const uint32_t kHoleNanUpper32 = 0xFFF7FFFF; const uint32_t kHoleNanLower32 = 0xFFF7FFFF; +#endif const uint64_t kHoleNanInt64 = (static_cast<uint64_t>(kHoleNanUpper32) << 32) | kHoleNanLower32; @@ -711,10 +723,12 @@ enum VariableMode { CONST_LEGACY, // declared via legacy 'const' declarations - LET, // declared via 'let' declarations + LET, // declared via 'let' declarations (first lexical) CONST, // declared via 'const' declarations + IMPORT, // declared via 'import' declarations (last lexical) + // Variables introduced by the compiler: INTERNAL, // like VAR, but not user-visible (may or may not // be in a context) @@ -742,17 +756,17 @@ inline bool IsDynamicVariableMode(VariableMode mode) { inline bool IsDeclaredVariableMode(VariableMode mode) { - return mode >= VAR && mode <= CONST; + return mode >= VAR && mode <= IMPORT; } inline bool IsLexicalVariableMode(VariableMode mode) { - return mode == LET || mode == CONST; + return mode >= LET && mode <= IMPORT; } inline bool IsImmutableVariableMode(VariableMode mode) { - return mode == CONST || mode == CONST_LEGACY; + return mode == CONST || mode == CONST_LEGACY || mode == IMPORT; } @@ -796,6 +810,10 @@ enum InitializationFlag { enum MaybeAssignedFlag { kNotAssigned, kMaybeAssigned }; +// Serialized in PreparseData, so numeric values should not be changed. +enum ParseErrorType { kSyntaxError = 0, kReferenceError = 1 }; + + enum ClearExceptionFlag { KEEP_EXCEPTION, CLEAR_EXCEPTION @@ -821,8 +839,13 @@ enum FunctionKind { kDefaultConstructor = 1 << 4, kSubclassConstructor = 1 << 5, kBaseConstructor = 1 << 6, + kInObjectLiteral = 1 << 7, kDefaultBaseConstructor = kDefaultConstructor | kBaseConstructor, - kDefaultSubclassConstructor = kDefaultConstructor | kSubclassConstructor + kDefaultSubclassConstructor = kDefaultConstructor | kSubclassConstructor, + kConciseMethodInObjectLiteral = kConciseMethod | kInObjectLiteral, + kConciseGeneratorMethodInObjectLiteral = + kConciseGeneratorMethod | kInObjectLiteral, + kAccessorFunctionInObjectLiteral = kAccessorFunction | kInObjectLiteral, }; @@ -836,7 +859,10 @@ inline bool IsValidFunctionKind(FunctionKind kind) { kind == FunctionKind::kDefaultBaseConstructor || kind == FunctionKind::kDefaultSubclassConstructor || kind == FunctionKind::kBaseConstructor || - kind == FunctionKind::kSubclassConstructor; + kind == FunctionKind::kSubclassConstructor || + kind == FunctionKind::kConciseMethodInObjectLiteral || + kind == FunctionKind::kConciseGeneratorMethodInObjectLiteral || + kind == FunctionKind::kAccessorFunctionInObjectLiteral; } @@ -888,6 +914,19 @@ inline bool IsConstructor(FunctionKind kind) { (FunctionKind::kBaseConstructor | FunctionKind::kSubclassConstructor | FunctionKind::kDefaultConstructor); } + + +inline bool IsInObjectLiteral(FunctionKind kind) { + DCHECK(IsValidFunctionKind(kind)); + return kind & FunctionKind::kInObjectLiteral; +} + + +inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { + kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); + DCHECK(IsValidFunctionKind(kind)); + return kind; +} } } // namespace v8::internal namespace i = v8::internal; |