33 using namespace ::v8::internal;
36 #define ASM __asm__ __volatile__
38 #if defined(_M_X64) || defined(__x86_64__)
39 #define GET_STACK_POINTER() \
40 static int sp_addr = 0; \
42 ASM("mov %%rsp, %0" : "=g" (sp_addr)); \
44 #elif defined(_M_IX86) || defined(__i386__)
45 #define GET_STACK_POINTER() \
46 static int sp_addr = 0; \
48 ASM("mov %%esp, %0" : "=g" (sp_addr)); \
50 #elif defined(__ARMEL__)
51 #define GET_STACK_POINTER() \
52 static int sp_addr = 0; \
54 ASM("str %%sp, %0" : "=g" (sp_addr)); \
56 #elif defined(__AARCH64EL__)
57 #define GET_STACK_POINTER() \
58 static int sp_addr = 0; \
60 ASM("mov x16, sp; str x16, %0" : "=g" (sp_addr)); \
62 #elif defined(__MIPSEL__)
63 #define GET_STACK_POINTER() \
64 static int sp_addr = 0; \
66 ASM("sw $sp, %0" : "=g" (sp_addr)); \
69 #error Host architecture was not detected as supported by v8
78 TEST(StackAlignment) {
83 global_template->
Set(v8_str(
"get_stack_pointer"),
89 " return get_stack_pointer();"
100 #undef GET_STACK_POINTERS
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter NULL
#define CHECK_EQ(expected, value)
Local< Value > Call(Handle< Value > recv, int argc, Handle< Value > argv[])
Local< Value > Get(Handle< Value > key)
V8_INLINE ReturnValue< T > GetReturnValue() const
void Set(Handle< String > name, Handle< Data > value, PropertyAttribute attributes=None)
static Local< ObjectTemplate > New()
static Local< FunctionTemplate > New(Isolate *isolate, FunctionCallback callback=0, Handle< Value > data=Handle< Value >(), Handle< Signature > signature=Handle< Signature >(), int length=0)
int32_t Int32Value() const
static V8_INLINE Local< T > Cast(Local< S > that)
static v8::Isolate * isolate()