2 * Copyright (C) 2011, 2014 Apple Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 #ifndef LLIntSlowPaths_h
27 #define LLIntSlowPaths_h
29 #include "CommonSlowPaths.h"
30 #include <wtf/StdLibExtras.h>
36 struct ProtoCallFrame
;
40 extern "C" SlowPathReturnType
llint_trace_operand(ExecState
*, Instruction
*, int fromWhere
, int operand
);
41 extern "C" SlowPathReturnType
llint_trace_value(ExecState
*, Instruction
*, int fromWhere
, int operand
);
42 extern "C" void llint_write_barrier_slow(ExecState
*, JSCell
*) WTF_INTERNAL
;
44 #define LLINT_SLOW_PATH_DECL(name) \
45 extern "C" SlowPathReturnType llint_##name(ExecState* exec, Instruction* pc)
47 #define LLINT_SLOW_PATH_HIDDEN_DECL(name) \
48 LLINT_SLOW_PATH_DECL(name) WTF_INTERNAL
50 LLINT_SLOW_PATH_HIDDEN_DECL(trace_prologue
);
51 LLINT_SLOW_PATH_HIDDEN_DECL(trace_prologue_function_for_call
);
52 LLINT_SLOW_PATH_HIDDEN_DECL(trace_prologue_function_for_construct
);
53 LLINT_SLOW_PATH_HIDDEN_DECL(trace_arityCheck_for_call
);
54 LLINT_SLOW_PATH_HIDDEN_DECL(trace_arityCheck_for_construct
);
55 LLINT_SLOW_PATH_HIDDEN_DECL(trace
);
56 LLINT_SLOW_PATH_HIDDEN_DECL(special_trace
);
57 LLINT_SLOW_PATH_HIDDEN_DECL(entry_osr
);
58 LLINT_SLOW_PATH_HIDDEN_DECL(entry_osr_function_for_call
);
59 LLINT_SLOW_PATH_HIDDEN_DECL(entry_osr_function_for_construct
);
60 LLINT_SLOW_PATH_HIDDEN_DECL(entry_osr_function_for_call_arityCheck
);
61 LLINT_SLOW_PATH_HIDDEN_DECL(entry_osr_function_for_construct_arityCheck
);
62 LLINT_SLOW_PATH_HIDDEN_DECL(loop_osr
);
63 LLINT_SLOW_PATH_HIDDEN_DECL(replace
);
64 LLINT_SLOW_PATH_HIDDEN_DECL(stack_check
);
65 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_create_activation
);
66 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_object
);
67 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_array
);
68 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_array_with_size
);
69 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_array_buffer
);
70 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_regexp
);
71 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_check_has_instance
);
72 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_instanceof
);
73 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_by_id
);
74 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_arguments_length
);
75 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_by_id
);
76 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_del_by_id
);
77 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_by_val
);
78 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_argument_by_val
);
79 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_by_pname
);
80 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_by_val
);
81 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_by_val_direct
);
82 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_del_by_val
);
83 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_by_index
);
84 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_getter_setter
);
85 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jtrue
);
86 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jfalse
);
87 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jless
);
88 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jnless
);
89 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jgreater
);
90 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jngreater
);
91 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jlesseq
);
92 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jnlesseq
);
93 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jgreatereq
);
94 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jngreatereq
);
95 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_switch_imm
);
96 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_switch_char
);
97 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_switch_string
);
98 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_func
);
99 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_func_exp
);
100 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_call
);
101 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_construct
);
102 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_size_frame_for_varargs
);
103 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_call_varargs
);
104 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_construct_varargs
);
105 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_call_eval
);
106 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_tear_off_activation
);
107 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_tear_off_arguments
);
108 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_strcat
);
109 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_to_primitive
);
110 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_pnames
);
111 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_next_pname
);
112 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_push_with_scope
);
113 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_pop_scope
);
114 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_push_name_scope
);
115 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_throw
);
116 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_throw_static_error
);
117 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_handle_watchdog_timer
);
118 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_debug
);
119 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_profile_will_call
);
120 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_profile_did_call
);
121 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_handle_exception
);
122 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_resolve_scope
);
123 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_from_scope
);
124 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_to_scope
);
125 extern "C" SlowPathReturnType
llint_throw_stack_overflow_error(VM
*, ProtoCallFrame
*) WTF_INTERNAL
;
127 extern "C" SlowPathReturnType
llint_stack_check_at_vm_entry(VM
*, Register
*) WTF_INTERNAL
;
129 extern "C" NO_RETURN_DUE_TO_CRASH
void llint_crash() WTF_INTERNAL
;
131 } } // namespace JSC::LLInt
133 #endif // LLIntSlowPaths_h