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 e6f84cc6c2b..3ee9b5576b4 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 | ||
| @@ -1563,23 +1535,10 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 1563 | AFTER_POTENTIAL_GC (); | 1535 | AFTER_POTENTIAL_GC (); |
| 1564 | op = XINT (v2); | 1536 | op = XINT (v2); |
| 1565 | immediate_quit = 1; | 1537 | immediate_quit = 1; |
| 1566 | while (--op >= 0) | 1538 | while (--op >= 0 && CONSP (v1)) |
| 1567 | { | 1539 | v1 = XCDR (v1); |
| 1568 | if (CONSP (v1)) | ||
| 1569 | v1 = XCDR (v1); | ||
| 1570 | else if (!NILP (v1)) | ||
| 1571 | { | ||
| 1572 | immediate_quit = 0; | ||
| 1573 | wrong_type_argument (Qlistp, v1); | ||
| 1574 | } | ||
| 1575 | } | ||
| 1576 | immediate_quit = 0; | 1540 | immediate_quit = 0; |
| 1577 | if (CONSP (v1)) | 1541 | TOP = CAR (v1); |
| 1578 | TOP = XCAR (v1); | ||
| 1579 | else if (NILP (v1)) | ||
| 1580 | TOP = Qnil; | ||
| 1581 | else | ||
| 1582 | wrong_type_argument (Qlistp, v1); | ||
| 1583 | } | 1542 | } |
| 1584 | else | 1543 | else |
| 1585 | { | 1544 | { |
| @@ -1641,10 +1600,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 1641 | { | 1600 | { |
| 1642 | Lisp_Object v1; | 1601 | Lisp_Object v1; |
| 1643 | v1 = TOP; | 1602 | v1 = TOP; |
| 1644 | if (CONSP (v1)) | 1603 | TOP = CAR_SAFE (v1); |
| 1645 | TOP = XCAR (v1); | ||
| 1646 | else | ||
| 1647 | TOP = Qnil; | ||
| 1648 | break; | 1604 | break; |
| 1649 | } | 1605 | } |
| 1650 | 1606 | ||
| @@ -1652,10 +1608,7 @@ If the third argument is incorrect, Emacs may crash. */) | |||
| 1652 | { | 1608 | { |
| 1653 | Lisp_Object v1; | 1609 | Lisp_Object v1; |
| 1654 | v1 = TOP; | 1610 | v1 = TOP; |
| 1655 | if (CONSP (v1)) | 1611 | TOP = CDR_SAFE (v1); |
| 1656 | TOP = XCDR (v1); | ||
| 1657 | else | ||
| 1658 | TOP = Qnil; | ||
| 1659 | break; | 1612 | break; |
| 1660 | } | 1613 | } |
| 1661 | 1614 | ||