1 | /* |
2 | * Copyright (C) 2011-2018 Apple Inc. All rights reserved. |
3 | * |
4 | * Redistribution and use in source and binary forms, with or without |
5 | * modification, are permitted provided that the following conditions |
6 | * are met: |
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. |
12 | * |
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. |
24 | */ |
25 | |
26 | #pragma once |
27 | |
28 | #include "CommonSlowPaths.h" |
29 | #include <wtf/StdLibExtras.h> |
30 | |
31 | namespace JSC { |
32 | |
33 | class CallFrame; |
34 | struct Instruction; |
35 | struct ProtoCallFrame; |
36 | |
37 | namespace LLInt { |
38 | |
39 | extern "C" SlowPathReturnType llint_trace_operand(CallFrame*, const Instruction*, int fromWhere, int operand); |
40 | extern "C" SlowPathReturnType llint_trace_value(CallFrame*, const Instruction*, int fromWhere, VirtualRegister operand); |
41 | extern "C" void llint_write_barrier_slow(CallFrame*, JSCell*) WTF_INTERNAL; |
42 | |
43 | #define LLINT_SLOW_PATH_DECL(name) \ |
44 | extern "C" SlowPathReturnType llint_##name(CallFrame* callFrame, const Instruction* pc) |
45 | |
46 | #define LLINT_SLOW_PATH_HIDDEN_DECL(name) \ |
47 | LLINT_SLOW_PATH_DECL(name) WTF_INTERNAL |
48 | |
49 | LLINT_SLOW_PATH_HIDDEN_DECL(trace_prologue); |
50 | LLINT_SLOW_PATH_HIDDEN_DECL(trace_prologue_function_for_call); |
51 | LLINT_SLOW_PATH_HIDDEN_DECL(trace_prologue_function_for_construct); |
52 | LLINT_SLOW_PATH_HIDDEN_DECL(trace_arityCheck_for_call); |
53 | LLINT_SLOW_PATH_HIDDEN_DECL(trace_arityCheck_for_construct); |
54 | LLINT_SLOW_PATH_HIDDEN_DECL(trace); |
55 | LLINT_SLOW_PATH_HIDDEN_DECL(entry_osr); |
56 | LLINT_SLOW_PATH_HIDDEN_DECL(entry_osr_function_for_call); |
57 | LLINT_SLOW_PATH_HIDDEN_DECL(entry_osr_function_for_construct); |
58 | LLINT_SLOW_PATH_HIDDEN_DECL(entry_osr_function_for_call_arityCheck); |
59 | LLINT_SLOW_PATH_HIDDEN_DECL(entry_osr_function_for_construct_arityCheck); |
60 | LLINT_SLOW_PATH_HIDDEN_DECL(loop_osr); |
61 | LLINT_SLOW_PATH_HIDDEN_DECL(replace); |
62 | LLINT_SLOW_PATH_HIDDEN_DECL(stack_check); |
63 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_object); |
64 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_array); |
65 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_array_with_size); |
66 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_regexp); |
67 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_instanceof); |
68 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_instanceof_custom); |
69 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_try_get_by_id); |
70 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_by_id_direct); |
71 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_by_id); |
72 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_by_id); |
73 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_del_by_id); |
74 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_by_val); |
75 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_argument_by_val); |
76 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_by_val); |
77 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_by_val_direct); |
78 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_del_by_val); |
79 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_getter_by_id); |
80 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_setter_by_id); |
81 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_getter_setter_by_id); |
82 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_getter_by_val); |
83 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_setter_by_val); |
84 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jtrue); |
85 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jfalse); |
86 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jless); |
87 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jnless); |
88 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jgreater); |
89 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jngreater); |
90 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jlesseq); |
91 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jnlesseq); |
92 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jgreatereq); |
93 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jngreatereq); |
94 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jeq); |
95 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jneq); |
96 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jstricteq); |
97 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jnstricteq); |
98 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_switch_imm); |
99 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_switch_char); |
100 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_switch_string); |
101 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_func); |
102 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_func_exp); |
103 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_generator_func); |
104 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_generator_func_exp); |
105 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_async_generator_func); |
106 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_async_generator_func_exp); |
107 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_async_func); |
108 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_async_func_exp); |
109 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_set_function_name); |
110 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_call); |
111 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_tail_call); |
112 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_construct); |
113 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_size_frame_for_varargs); |
114 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_size_frame_for_forward_arguments); |
115 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_call_varargs); |
116 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_tail_call_varargs); |
117 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_tail_call_forward_arguments); |
118 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_construct_varargs); |
119 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_call_eval); |
120 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_call_eval_wide16); |
121 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_call_eval_wide32); |
122 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_tear_off_arguments); |
123 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_strcat); |
124 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_to_primitive); |
125 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_throw); |
126 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_handle_traps); |
127 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_debug); |
128 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_handle_exception); |
129 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_from_scope); |
130 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_to_scope); |
131 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_check_if_exception_is_uncatchable_and_notify_profiler); |
132 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_profile_catch); |
133 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_log_shadow_chicken_prologue); |
134 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_log_shadow_chicken_tail); |
135 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_super_sampler_begin); |
136 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_super_sampler_end); |
137 | LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_out_of_line_jump_target); |
138 | extern "C" SlowPathReturnType llint_throw_stack_overflow_error(VM*, ProtoCallFrame*) WTF_INTERNAL; |
139 | #if ENABLE(C_LOOP) |
140 | extern "C" SlowPathReturnType llint_stack_check_at_vm_entry(VM*, Register*) WTF_INTERNAL; |
141 | #endif |
142 | extern "C" NO_RETURN_DUE_TO_CRASH void llint_crash() WTF_INTERNAL; |
143 | |
144 | } } // namespace JSC::LLInt |
145 | |