diff options
Diffstat (limited to 'Source/JavaScriptCore/llint/LLIntSlowPaths.h')
-rw-r--r-- | Source/JavaScriptCore/llint/LLIntSlowPaths.h | 45 |
1 files changed, 31 insertions, 14 deletions
diff --git a/Source/JavaScriptCore/llint/LLIntSlowPaths.h b/Source/JavaScriptCore/llint/LLIntSlowPaths.h index 2e069d073..fe897d4a4 100644 --- a/Source/JavaScriptCore/llint/LLIntSlowPaths.h +++ b/Source/JavaScriptCore/llint/LLIntSlowPaths.h @@ -44,33 +44,50 @@ namespace LLInt { // warnings, or worse, a change in the ABI used to return these types. struct SlowPathReturnType { void* a; - void* b; + ExecState* b; }; -inline SlowPathReturnType encodeResult(void* a, void* b) +inline SlowPathReturnType encodeResult(void* a, ExecState* b) { SlowPathReturnType result; result.a = a; result.b = b; return result; } -#else + +inline void decodeResult(SlowPathReturnType result, void*& a, ExecState*& b) +{ + a = result.a; + b = result.b; +} + +#else // USE(JSVALUE32_64) typedef int64_t SlowPathReturnType; -inline SlowPathReturnType encodeResult(void* a, void* b) +typedef union { + struct { + void* a; + ExecState* b; + } pair; + int64_t i; +} SlowPathReturnTypeEncoding; + +inline SlowPathReturnType encodeResult(void* a, ExecState* b) { - union { - struct { - void* a; - void* b; - } pair; - int64_t i; - } u; + SlowPathReturnTypeEncoding u; u.pair.a = a; u.pair.b = b; return u.i; } -#endif + +inline void decodeResult(SlowPathReturnType result, void*& a, ExecState*& b) +{ + SlowPathReturnTypeEncoding u; + u.i = result; + a = u.pair.a; + b = u.pair.b; +} +#endif // USE(JSVALUE32_64) extern "C" SlowPathReturnType llint_trace_operand(ExecState*, Instruction*, int fromWhere, int operand); extern "C" SlowPathReturnType llint_trace_value(ExecState*, Instruction*, int fromWhere, int operand); @@ -185,9 +202,9 @@ LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_strcat); LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_to_primitive); LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_pnames); LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_next_pname); -LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_push_scope); +LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_push_with_scope); LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_pop_scope); -LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_push_new_scope); +LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_push_name_scope); LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_throw); LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_throw_reference_error); LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_debug); |