diff options
Diffstat (limited to 'src/bytecode.c')
| -rw-r--r-- | src/bytecode.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/bytecode.c b/src/bytecode.c index c88ca509119..76ec066c637 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -137,7 +137,7 @@ the third, MAXDEPTH, the maximum stack depth used in this function. | |||
| 137 | If the third argument is incorrect, Emacs may crash. */) | 137 | If the third argument is incorrect, Emacs may crash. */) |
| 138 | (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth) | 138 | (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth) |
| 139 | { | 139 | { |
| 140 | return exec_byte_code (bytestr, vector, maxdepth, Qnil, 0, NULL); | 140 | return exec_byte_code__ (bytestr, vector, maxdepth, Qnil, 0, NULL); |
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | void | 143 | void |
| @@ -155,8 +155,8 @@ bcall0 (Lisp_Object f) | |||
| 155 | executing BYTESTR. */ | 155 | executing BYTESTR. */ |
| 156 | 156 | ||
| 157 | Lisp_Object | 157 | Lisp_Object |
| 158 | exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | 158 | exec_byte_code__ (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, |
| 159 | Lisp_Object args_template, ptrdiff_t nargs, Lisp_Object *args) | 159 | Lisp_Object args_template, ptrdiff_t nargs, Lisp_Object *args) |
| 160 | { | 160 | { |
| 161 | #ifdef BYTE_CODE_METER | 161 | #ifdef BYTE_CODE_METER |
| 162 | int volatile this_op = 0; | 162 | int volatile this_op = 0; |
| @@ -1283,6 +1283,24 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 1283 | return result; | 1283 | return result; |
| 1284 | } | 1284 | } |
| 1285 | 1285 | ||
| 1286 | Lisp_Object | ||
| 1287 | exec_byte_code (Lisp_Object byte_code, Lisp_Object args_template, | ||
| 1288 | ptrdiff_t nargs, Lisp_Object *args) | ||
| 1289 | { | ||
| 1290 | if (AREF (byte_code, COMPILED_JIT_ID)) | ||
| 1291 | return jit_exec (byte_code, args_template, nargs, args); | ||
| 1292 | else if (!byte_code_jit_on) | ||
| 1293 | return exec_byte_code__ (AREF (byte_code, COMPILED_BYTECODE), | ||
| 1294 | AREF (byte_code, COMPILED_CONSTANTS), | ||
| 1295 | AREF (byte_code, COMPILED_STACK_DEPTH), | ||
| 1296 | args_template, nargs, args); | ||
| 1297 | else | ||
| 1298 | { | ||
| 1299 | jit_byte_code__ (byte_code); | ||
| 1300 | return jit_exec (byte_code, args_template, nargs, args); | ||
| 1301 | } | ||
| 1302 | } | ||
| 1303 | |||
| 1286 | /* `args_template' has the same meaning as in exec_byte_code() above. */ | 1304 | /* `args_template' has the same meaning as in exec_byte_code() above. */ |
| 1287 | Lisp_Object | 1305 | Lisp_Object |
| 1288 | get_byte_code_arity (Lisp_Object args_template) | 1306 | get_byte_code_arity (Lisp_Object args_template) |