diff options
Diffstat (limited to 'src/lj_ffrecord.c')
-rw-r--r-- | src/lj_ffrecord.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/lj_ffrecord.c b/src/lj_ffrecord.c index e17f6818..318329d0 100644 --- a/src/lj_ffrecord.c +++ b/src/lj_ffrecord.c | |||
@@ -96,6 +96,13 @@ static ptrdiff_t results_wanted(jit_State *J) | |||
96 | return -1; | 96 | return -1; |
97 | } | 97 | } |
98 | 98 | ||
99 | #ifdef LUAJIT_TRACE_STITCHING | ||
100 | /* This feature is disabled for now due to a design mistake. Sorry. | ||
101 | ** | ||
102 | ** It causes unpredictable behavior and crashes when a full trace flush | ||
103 | ** happens with a stitching continuation still in the stack somewhere. | ||
104 | */ | ||
105 | |||
99 | /* Trace stitching: add continuation below frame to start a new trace. */ | 106 | /* Trace stitching: add continuation below frame to start a new trace. */ |
100 | static void recff_stitch(jit_State *J) | 107 | static void recff_stitch(jit_State *J) |
101 | { | 108 | { |
@@ -174,6 +181,31 @@ static void LJ_FASTCALL recff_nyi(jit_State *J, RecordFFData *rd) | |||
174 | 181 | ||
175 | /* Must stop the trace for classic C functions with arbitrary side-effects. */ | 182 | /* Must stop the trace for classic C functions with arbitrary side-effects. */ |
176 | #define recff_c recff_nyi | 183 | #define recff_c recff_nyi |
184 | #else | ||
185 | /* Fallback handler for fast functions that are not recorded (yet). */ | ||
186 | LJ_NORET static void recff_nyi(jit_State *J, RecordFFData *rd) | ||
187 | { | ||
188 | setfuncV(J->L, &J->errinfo, J->fn); | ||
189 | lj_trace_err_info(J, LJ_TRERR_NYIFF); | ||
190 | UNUSED(rd); | ||
191 | } | ||
192 | |||
193 | /* Throw error for unsupported variant of fast function. */ | ||
194 | LJ_NORET static void recff_nyiu(jit_State *J, RecordFFData *rd) | ||
195 | { | ||
196 | setfuncV(J->L, &J->errinfo, J->fn); | ||
197 | lj_trace_err_info(J, LJ_TRERR_NYIFFU); | ||
198 | UNUSED(rd); | ||
199 | } | ||
200 | |||
201 | /* Must abort the trace for classic C functions with arbitrary side-effects. */ | ||
202 | LJ_NORET static void recff_c(jit_State *J, RecordFFData *rd) | ||
203 | { | ||
204 | setfuncV(J->L, &J->errinfo, J->fn); | ||
205 | lj_trace_err_info(J, LJ_TRERR_NYICF); | ||
206 | UNUSED(rd); | ||
207 | } | ||
208 | #endif | ||
177 | 209 | ||
178 | /* Emit BUFHDR for the global temporary buffer. */ | 210 | /* Emit BUFHDR for the global temporary buffer. */ |
179 | static TRef recff_bufhdr(jit_State *J) | 211 | static TRef recff_bufhdr(jit_State *J) |