diff options
Diffstat (limited to 'src/bytecode.c')
| -rw-r--r-- | src/bytecode.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/bytecode.c b/src/bytecode.c index 3267c7c8c76..7676c8550a4 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | /* Execution of byte code produced by bytecomp.el. | 1 | /* Execution of byte code produced by bytecomp.el. |
| 2 | Copyright (C) 1985-1988, 1993, 2000-2012 Free Software Foundation, Inc. | 2 | Copyright (C) 1985-1988, 1993, 2000-2013 Free Software Foundation, |
| 3 | Inc. | ||
| 3 | 4 | ||
| 4 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 5 | 6 | ||
| @@ -87,8 +88,6 @@ Lisp_Object Qbyte_code_meter; | |||
| 87 | #endif /* BYTE_CODE_METER */ | 88 | #endif /* BYTE_CODE_METER */ |
| 88 | 89 | ||
| 89 | 90 | ||
| 90 | Lisp_Object Qbytecode; | ||
| 91 | |||
| 92 | /* Byte codes: */ | 91 | /* Byte codes: */ |
| 93 | 92 | ||
| 94 | #define BYTE_CODES \ | 93 | #define BYTE_CODES \ |
| @@ -314,9 +313,11 @@ struct byte_stack | |||
| 314 | Lisp_Object byte_string; | 313 | Lisp_Object byte_string; |
| 315 | const unsigned char *byte_string_start; | 314 | const unsigned char *byte_string_start; |
| 316 | 315 | ||
| 316 | #if BYTE_MARK_STACK | ||
| 317 | /* The vector of constants used during byte-code execution. Storing | 317 | /* The vector of constants used during byte-code execution. Storing |
| 318 | this here protects it from GC because mark_byte_stack marks it. */ | 318 | this here protects it from GC because mark_byte_stack marks it. */ |
| 319 | Lisp_Object constants; | 319 | Lisp_Object constants; |
| 320 | #endif | ||
| 320 | 321 | ||
| 321 | /* Next entry in byte_stack_list. */ | 322 | /* Next entry in byte_stack_list. */ |
| 322 | struct byte_stack *next; | 323 | struct byte_stack *next; |
| @@ -380,12 +381,12 @@ unmark_byte_stack (void) | |||
| 380 | } | 381 | } |
| 381 | 382 | ||
| 382 | 383 | ||
| 383 | /* Fetch the next byte from the bytecode stream */ | 384 | /* Fetch the next byte from the bytecode stream. */ |
| 384 | 385 | ||
| 385 | #define FETCH *stack.pc++ | 386 | #define FETCH *stack.pc++ |
| 386 | 387 | ||
| 387 | /* Fetch two bytes from the bytecode stream and make a 16-bit number | 388 | /* Fetch two bytes from the bytecode stream and make a 16-bit number |
| 388 | out of them */ | 389 | out of them. */ |
| 389 | 390 | ||
| 390 | #define FETCH2 (op = FETCH, op + (FETCH << 8)) | 391 | #define FETCH2 (op = FETCH, op + (FETCH << 8)) |
| 391 | 392 | ||
| @@ -405,7 +406,7 @@ unmark_byte_stack (void) | |||
| 405 | #define DISCARD(n) (top -= (n)) | 406 | #define DISCARD(n) (top -= (n)) |
| 406 | 407 | ||
| 407 | /* Get the value which is at the top of the execution stack, but don't | 408 | /* Get the value which is at the top of the execution stack, but don't |
| 408 | pop it. */ | 409 | pop it. */ |
| 409 | 410 | ||
| 410 | #define TOP (*top) | 411 | #define TOP (*top) |
| 411 | 412 | ||
| @@ -536,7 +537,9 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 536 | 537 | ||
| 537 | stack.byte_string = bytestr; | 538 | stack.byte_string = bytestr; |
| 538 | stack.pc = stack.byte_string_start = SDATA (bytestr); | 539 | stack.pc = stack.byte_string_start = SDATA (bytestr); |
| 540 | #if BYTE_MARK_STACK | ||
| 539 | stack.constants = vector; | 541 | stack.constants = vector; |
| 542 | #endif | ||
| 540 | if (MAX_ALLOCA / word_size <= XFASTINT (maxdepth)) | 543 | if (MAX_ALLOCA / word_size <= XFASTINT (maxdepth)) |
| 541 | memory_full (SIZE_MAX); | 544 | memory_full (SIZE_MAX); |
| 542 | top = alloca ((XFASTINT (maxdepth) + 1) * sizeof *top); | 545 | top = alloca ((XFASTINT (maxdepth) + 1) * sizeof *top); |
| @@ -657,7 +660,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 657 | the table clearer. */ | 660 | the table clearer. */ |
| 658 | #define LABEL(OP) [OP] = &&insn_ ## OP | 661 | #define LABEL(OP) [OP] = &&insn_ ## OP |
| 659 | 662 | ||
| 660 | #if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ | 663 | #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) |
| 661 | # pragma GCC diagnostic push | 664 | # pragma GCC diagnostic push |
| 662 | # pragma GCC diagnostic ignored "-Woverride-init" | 665 | # pragma GCC diagnostic ignored "-Woverride-init" |
| 663 | #endif | 666 | #endif |
| @@ -673,7 +676,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 673 | #undef DEFINE | 676 | #undef DEFINE |
| 674 | }; | 677 | }; |
| 675 | 678 | ||
| 676 | #if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ | 679 | #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) |
| 677 | # pragma GCC diagnostic pop | 680 | # pragma GCC diagnostic pop |
| 678 | #endif | 681 | #endif |
| 679 | 682 | ||
| @@ -752,7 +755,6 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 752 | { | 755 | { |
| 753 | BEFORE_POTENTIAL_GC (); | 756 | BEFORE_POTENTIAL_GC (); |
| 754 | wrong_type_argument (Qlistp, v1); | 757 | wrong_type_argument (Qlistp, v1); |
| 755 | AFTER_POTENTIAL_GC (); | ||
| 756 | } | 758 | } |
| 757 | NEXT; | 759 | NEXT; |
| 758 | } | 760 | } |
| @@ -787,7 +789,6 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 787 | { | 789 | { |
| 788 | BEFORE_POTENTIAL_GC (); | 790 | BEFORE_POTENTIAL_GC (); |
| 789 | wrong_type_argument (Qlistp, v1); | 791 | wrong_type_argument (Qlistp, v1); |
| 790 | AFTER_POTENTIAL_GC (); | ||
| 791 | } | 792 | } |
| 792 | NEXT; | 793 | NEXT; |
| 793 | } | 794 | } |
| @@ -1963,8 +1964,6 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 1963 | void | 1964 | void |
| 1964 | syms_of_bytecode (void) | 1965 | syms_of_bytecode (void) |
| 1965 | { | 1966 | { |
| 1966 | DEFSYM (Qbytecode, "byte-code"); | ||
| 1967 | |||
| 1968 | defsubr (&Sbyte_code); | 1967 | defsubr (&Sbyte_code); |
| 1969 | 1968 | ||
| 1970 | #ifdef BYTE_CODE_METER | 1969 | #ifdef BYTE_CODE_METER |