diff options
Diffstat (limited to 'deps/v8/src/globals.h')
-rw-r--r-- | deps/v8/src/globals.h | 56 |
1 files changed, 27 insertions, 29 deletions
diff --git a/deps/v8/src/globals.h b/deps/v8/src/globals.h index b9437f2ac4..db666d804b 100644 --- a/deps/v8/src/globals.h +++ b/deps/v8/src/globals.h @@ -71,6 +71,10 @@ namespace internal { #define V8_HOST_ARCH_IA32 1 #define V8_HOST_ARCH_32_BIT 1 #define V8_HOST_CAN_READ_UNALIGNED 1 +#elif defined(__AARCH64EL__) +#define V8_HOST_ARCH_ARM64 1 +#define V8_HOST_ARCH_64_BIT 1 +#define V8_HOST_CAN_READ_UNALIGNED 1 #elif defined(__ARMEL__) #define V8_HOST_ARCH_ARM 1 #define V8_HOST_ARCH_32_BIT 1 @@ -78,7 +82,7 @@ namespace internal { #define V8_HOST_ARCH_MIPS 1 #define V8_HOST_ARCH_32_BIT 1 #else -#error Host architecture was not detected as supported by v8 +#error "Host architecture was not detected as supported by v8" #endif #if defined(__ARM_ARCH_7A__) || \ @@ -95,11 +99,13 @@ namespace internal { // in the same way as the host architecture, that is, target the native // environment as presented by the compiler. #if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && \ - !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS + !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS #if defined(_M_X64) || defined(__x86_64__) #define V8_TARGET_ARCH_X64 1 #elif defined(_M_IX86) || defined(__i386__) #define V8_TARGET_ARCH_IA32 1 +#elif defined(__AARCH64EL__) +#define V8_TARGET_ARCH_ARM64 1 #elif defined(__ARMEL__) #define V8_TARGET_ARCH_ARM 1 #elif defined(__MIPSEL__) @@ -119,6 +125,9 @@ namespace internal { #if (V8_TARGET_ARCH_ARM && !(V8_HOST_ARCH_IA32 || V8_HOST_ARCH_ARM)) #error Target architecture arm is only supported on arm and ia32 host #endif +#if (V8_TARGET_ARCH_ARM64 && !(V8_HOST_ARCH_X64 || V8_HOST_ARCH_ARM64)) +#error Target architecture arm64 is only supported on arm64 and x64 host +#endif #if (V8_TARGET_ARCH_MIPS && !(V8_HOST_ARCH_IA32 || V8_HOST_ARCH_MIPS)) #error Target architecture mips is only supported on mips and ia32 host #endif @@ -127,6 +136,9 @@ namespace internal { // Setting USE_SIMULATOR explicitly from the build script will force // the use of a simulated environment. #if !defined(USE_SIMULATOR) +#if (V8_TARGET_ARCH_ARM64 && !V8_HOST_ARCH_ARM64) +#define USE_SIMULATOR 1 +#endif #if (V8_TARGET_ARCH_ARM && !V8_HOST_ARCH_ARM) #define USE_SIMULATOR 1 #endif @@ -142,12 +154,17 @@ namespace internal { #define V8_TARGET_LITTLE_ENDIAN 1 #elif V8_TARGET_ARCH_ARM #define V8_TARGET_LITTLE_ENDIAN 1 +#elif V8_TARGET_ARCH_ARM64 +#define V8_TARGET_LITTLE_ENDIAN 1 #elif V8_TARGET_ARCH_MIPS #define V8_TARGET_LITTLE_ENDIAN 1 #else #error Unknown target architecture endiannes #endif +// Determine whether the architecture uses an out-of-line constant pool. +#define V8_OOL_CONSTANT_POOL 0 + // Support for alternative bool type. This is only enabled if the code is // compiled with USE_MYBOOL defined. This catches some nasty type bugs. // For instance, 'bool b = "false";' results in b == true! This is a hidden @@ -376,6 +393,12 @@ F FUNCTION_CAST(Address addr) { #define DISABLE_ASAN #endif +#if V8_CC_GNU +#define V8_IMMEDIATE_CRASH() __builtin_trap() +#else +#define V8_IMMEDIATE_CRASH() ((void(*)())0)() +#endif + // ----------------------------------------------------------------------------- // Forward declarations for frequently used classes @@ -387,34 +410,9 @@ template <typename T, class P = FreeStoreAllocationPolicy> class List; // ----------------------------------------------------------------------------- // Declarations for use in both the preparser and the rest of V8. -// The different language modes that V8 implements. ES5 defines two language -// modes: an unrestricted mode respectively a strict mode which are indicated by -// CLASSIC_MODE respectively STRICT_MODE in the enum. The harmony spec drafts -// for the next ES standard specify a new third mode which is called 'extended -// mode'. The extended mode is only available if the harmony flag is set. It is -// based on the 'strict mode' and adds new functionality to it. This means that -// most of the semantics of these two modes coincide. -// -// In the current draft the term 'base code' is used to refer to code that is -// neither in strict nor extended mode. However, the more distinguishing term -// 'classic mode' is used in V8 instead to avoid mix-ups. - -enum LanguageMode { - CLASSIC_MODE, - STRICT_MODE, - EXTENDED_MODE -}; - - // The Strict Mode (ECMA-262 5th edition, 4.2.2). -// -// This flag is used in the backend to represent the language mode. So far -// there is no semantic difference between the strict and the extended mode in -// the backend, so both modes are represented by the kStrictMode value. -enum StrictModeFlag { - kNonStrictMode, - kStrictMode -}; + +enum StrictMode { SLOPPY, STRICT }; } } // namespace v8::internal |