| 518 | | (case (car-safe form) |
| 519 | | ;; |
| 520 | | (call-method |
| 521 | | (case (get-method-call-type gf form method-alist-p wrappers-p) |
| 522 | | (fast-method-call |
| 523 | | (let ((method (cadr form))) |
| 524 | | (if (and (eq *boot-state* 'complete) *inline-methods-in-emfs*) |
| 525 | | (method-function-name method) |
| 526 | | '.fast-call-method.))) |
| 527 | | (t '.call-method.))) |
| 528 | | ;; |
| 529 | | (call-method-list |
| 530 | | (case (get-method-list-call-type gf form method-alist-p wrappers-p) |
| 531 | | (fast-method-call |
| 532 | | (if (and (eq *boot-state* 'complete) *inline-methods-in-emfs*) |
| 533 | | (mapcar #'method-function-name (call-method-list-methods form)) |
| 534 | | '.fast-call-method-list.)) |
| 535 | | (t '.call-method-list.))) |
| 536 | | ;; |
| 537 | | (check-applicable-keywords |
| 538 | | 'check-applicable-keywords) |
| 539 | | (t |
| 540 | | (default-test-converter form)))) |
| | 515 | (flet ((method-key (method) |
| | 516 | (cond ((inlinable-method-p method) |
| | 517 | (method-function-name method)) |
| | 518 | ((eq (get-method-call-type gf form method-alist-p wrappers-p) |
| | 519 | 'fast-method-call) |
| | 520 | '.fast-call-method.) |
| | 521 | (t '.call-method.)))) |
| | 522 | (case (car-safe form) |
| | 523 | ;; |
| | 524 | (call-method |
| | 525 | (if (eq (get-method-call-type gf form method-alist-p wrappers-p) |
| | 526 | 'fast-method-call) |
| | 527 | (method-key (second form)) |
| | 528 | '.call-method.)) |
| | 529 | ;; |
| | 530 | (call-method-list |
| | 531 | (mapcar #'method-key (call-method-list-methods form))) |
| | 532 | ;; |
| | 533 | (check-applicable-keywords |
| | 534 | 'check-applicable-keywords) |
| | 535 | (t |
| | 536 | (default-test-converter form))))) |
| 550 | | (case (car-safe form) |
| 551 | | ;; |
| 552 | | ;; (CALL-METHOD <method-object> &optional <next-methods>) |
| 553 | | (call-method |
| 554 | | (let ((method (cadr form)) |
| 555 | | (callable-var (gensym)) |
| 556 | | (call-type (get-method-call-type gf form method-alist-p |
| 557 | | wrappers-p))) |
| 558 | | (if (and (eq call-type 'fast-method-call) |
| 559 | | (eq *boot-state* 'complete) |
| 560 | | *inline-methods-in-emfs*) |
| 561 | | (values (make-direct-call method metatypes applyp callable-var) |
| 562 | | (list callable-var)) |
| 563 | | (values (make-emf-call metatypes applyp callable-var call-type) |
| 564 | | (list callable-var))))) |
| 565 | | ;; |
| 566 | | ;; (CALL-METHOD-LIST <call-method-form>*) |
| 567 | | ;; where each CALL-METHOD form is (CALL-METHOD <method>) |
| 568 | | (call-method-list |
| 569 | | (let ((list-var (gensym)) |
| 570 | | (call-type (get-method-list-call-type gf form method-alist-p |
| 571 | | wrappers-p))) |
| 572 | | (if (and (eq call-type 'fast-method-call) |
| 573 | | (eq *boot-state* 'complete) |
| 574 | | *inline-methods-in-emfs*) |
| 575 | | (let ((methods (call-method-list-methods form))) |
| 576 | | (values (make-direct-calls methods metatypes applyp list-var) |
| 577 | | (list list-var))) |
| 578 | | (values `(dolist (.tem. ,list-var) |
| 579 | | ,(make-emf-call metatypes applyp '.tem. call-type)) |
| 580 | | (list list-var))))) |
| 581 | | ;; |
| 582 | | (check-applicable-keywords |
| 583 | | (values `(check-applicable-keywords .dfun-rest-arg. |
| 584 | | .keyargs-start. .valid-keys.) |
| 585 | | '(.keyargs-start. .valid-keys.))) |
| 586 | | (t |
| 587 | | (default-code-converter form)))) |
| | 546 | (labels ((make-call (call-type method metatypes rest? callable-var) |
| | 547 | (if (and (eq call-type 'fast-method-call) |
| | 548 | (inlinable-method-p method)) |
| | 549 | (make-direct-call method metatypes rest? callable-var) |
| | 550 | (make-emf-call metatypes rest? callable-var call-type))) |
| | 551 | |
| | 552 | (make-calls (call-type methods metatypes rest? list-var) |
| | 553 | `(let ((.list. ,list-var)) |
| | 554 | (declare (ignorable .list.)) |
| | 555 | ,@(loop for method in methods collect |
| | 556 | `(let ((.call. (pop .list.))) |
| | 557 | ,(make-call call-type method metatypes |
| | 558 | rest? '.call.)))))) |
| | 559 | (case (car-safe form) |
| | 560 | ;; |
| | 561 | ;; (CALL-METHOD <method-object> &optional <next-methods>) |
| | 562 | (call-method |
| | 563 | (let ((method (cadr form)) |
| | 564 | (callable-var (gensym)) |
| | 565 | (call-type (get-method-call-type gf form method-alist-p |
| | 566 | wrappers-p))) |
| | 567 | (values (make-call call-type method metatypes rest? callable-var) |
| | 568 | (list callable-var)))) |
| | 569 | ;; |
| | 570 | ;; (CALL-METHOD-LIST <call-method-form>*) |
| | 571 | ;; where each CALL-METHOD form is (CALL-METHOD <method>) |
| | 572 | (call-method-list |
| | 573 | (let ((list-var (gensym)) |
| | 574 | (call-type (get-method-list-call-type gf form method-alist-p |
| | 575 | wrappers-p)) |
| | 576 | (methods (call-method-list-methods form))) |
| | 577 | (values (make-calls call-type methods metatypes rest? list-var) |
| | 578 | (list list-var)))) |
| | 579 | ;; |
| | 580 | (check-applicable-keywords |
| | 581 | (values `(check-applicable-keywords .dfun-rest-arg. |
| | 582 | .keyargs-start. .valid-keys.) |
| | 583 | '(.keyargs-start. .valid-keys.))) |
| | 584 | (t |
| | 585 | (default-code-converter form))))) |