diff options
Diffstat (limited to 'src/bytecode.c')
| -rw-r--r-- | src/bytecode.c | 69 |
1 files changed, 11 insertions, 58 deletions
diff --git a/src/bytecode.c b/src/bytecode.c index 0d06890eabf..2facaa47062 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -433,8 +433,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 433 | #endif | 433 | #endif |
| 434 | 434 | ||
| 435 | CHECK_STRING (bytestr); | 435 | CHECK_STRING (bytestr); |
| 436 | if (!VECTORP (vector)) | 436 | CHECK_VECTOR (vector); |
| 437 | vector = wrong_type_argument (Qvectorp, vector); | ||
| 438 | CHECK_NUMBER (maxdepth); | 437 | CHECK_NUMBER (maxdepth); |
| 439 | 438 | ||
| 440 | if (STRING_MULTIBYTE (bytestr)) | 439 | if (STRING_MULTIBYTE (bytestr)) |
| @@ -542,14 +541,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 542 | { | 541 | { |
| 543 | Lisp_Object v1; | 542 | Lisp_Object v1; |
| 544 | v1 = TOP; | 543 | v1 = TOP; |
| 545 | if (CONSP (v1)) | 544 | TOP = CAR (v1); |
| 546 | TOP = XCAR (v1); | ||
| 547 | else if (NILP (v1)) | ||
| 548 | TOP = Qnil; | ||
| 549 | else | ||
| 550 | { | ||
| 551 | wrong_type_argument (Qlistp, v1); | ||
| 552 | } | ||
| 553 | break; | 545 | break; |
| 554 | } | 546 | } |
| 555 | 547 | ||
| @@ -575,14 +567,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 575 | { | 567 | { |
| 576 | Lisp_Object v1; | 568 | Lisp_Object v1; |
| 577 | v1 = TOP; | 569 | v1 = TOP; |
| 578 | if (CONSP (v1)) | 570 | TOP = CDR (v1); |
| 579 | TOP = XCDR (v1); | ||
| 580 | else if (NILP (v1)) | ||
| 581 | TOP = Qnil; | ||
| 582 | else | ||
| 583 | { | ||
| 584 | wrong_type_argument (Qlistp, v1); | ||
| 585 | } | ||
| 586 | break; | 571 | break; |
| 587 | } | 572 | } |
| 588 | 573 | ||
| @@ -917,23 +902,10 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 917 | AFTER_POTENTIAL_GC (); | 902 | AFTER_POTENTIAL_GC (); |
| 918 | op = XINT (v2); | 903 | op = XINT (v2); |
| 919 | immediate_quit = 1; | 904 | immediate_quit = 1; |
| 920 | while (--op >= 0) | 905 | while (--op >= 0 && CONSP (v1)) |
| 921 | { | 906 | v1 = XCDR (v1); |
| 922 | if (CONSP (v1)) | ||
| 923 | v1 = XCDR (v1); | ||
| 924 | else if (!NILP (v1)) | ||
| 925 | { | ||
| 926 | immediate_quit = 0; | ||
| 927 | wrong_type_argument (Qlistp, v1); | ||
| 928 | } | ||
| 929 | } | ||
| 930 | immediate_quit = 0; | 907 | immediate_quit = 0; |
| 931 | if (CONSP (v1)) | 908 | TOP = CAR (v1); |
| 932 | TOP = XCAR (v1); | ||
| 933 | else if (NILP (v1)) | ||
| 934 | TOP = Qnil; | ||
| 935 | else | ||
| 936 | wrong_type_argument (Qlistp, v1); | ||
| 937 | break; | 909 | break; |
| 938 | } | 910 | } |
| 939 | 911 | ||
| @@ -1556,23 +1528,10 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 1556 | AFTER_POTENTIAL_GC (); | 1528 | AFTER_POTENTIAL_GC (); |
| 1557 | op = XINT (v2); | 1529 | op = XINT (v2); |
| 1558 | immediate_quit = 1; | 1530 | immediate_quit = 1; |
| 1559 | while (--op >= 0) | 1531 | while (--op >= 0 && CONSP (v1)) |
| 1560 | { | 1532 | v1 = XCDR (v1); |
| 1561 | if (CONSP (v1)) | ||
| 1562 | v1 = XCDR (v1); | ||
| 1563 | else if (!NILP (v1)) | ||
| 1564 | { | ||
| 1565 | immediate_quit = 0; | ||
| 1566 | wrong_type_argument (Qlistp, v1); | ||
| 1567 | } | ||
| 1568 | } | ||
| 1569 | immediate_quit = 0; | 1533 | immediate_quit = 0; |
| 1570 | if (CONSP (v1)) | 1534 | TOP = CAR (v1); |
| 1571 | TOP = XCAR (v1); | ||
| 1572 | else if (NILP (v1)) | ||
| 1573 | TOP = Qnil; | ||
| 1574 | else | ||
| 1575 | wrong_type_argument (Qlistp, v1); | ||
| 1576 | } | 1535 | } |
| 1577 | else | 1536 | else |
| 1578 | { | 1537 | { |
| @@ -1634,10 +1593,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 1634 | { | 1593 | { |
| 1635 | Lisp_Object v1; | 1594 | Lisp_Object v1; |
| 1636 | v1 = TOP; | 1595 | v1 = TOP; |
| 1637 | if (CONSP (v1)) | 1596 | TOP = CAR_SAFE (v1); |
| 1638 | TOP = XCAR (v1); | ||
| 1639 | else | ||
| 1640 | TOP = Qnil; | ||
| 1641 | break; | 1597 | break; |
| 1642 | } | 1598 | } |
| 1643 | 1599 | ||
| @@ -1645,10 +1601,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 1645 | { | 1601 | { |
| 1646 | Lisp_Object v1; | 1602 | Lisp_Object v1; |
| 1647 | v1 = TOP; | 1603 | v1 = TOP; |
| 1648 | if (CONSP (v1)) | 1604 | TOP = CDR_SAFE (v1); |
| 1649 | TOP = XCDR (v1); | ||
| 1650 | else | ||
| 1651 | TOP = Qnil; | ||
| 1652 | break; | 1605 | break; |
| 1653 | } | 1606 | } |
| 1654 | 1607 | ||