1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00

call is no longer a vararg instruction

* libguile/vm-engine.c (push_frame, call): Separate out push_frame from
  call, and expect the caller to arrange the proc and arguments.

* test-suite/tests/rtl.test ("call"): Update tests.
This commit is contained in:
Andy Wingo 2013-07-20 23:10:36 +02:00
parent 7396d21670
commit 286a0fb3ae
2 changed files with 165 additions and 148 deletions

File diff suppressed because it is too large Load diff

View file

@ -145,7 +145,9 @@
'((begin-program call
((name . call)))
(begin-standard-arity (f) 2 #f)
(call 2 1 ())
(push-frame 2 1)
(mov 5 1)
(call 2)
(return 2) ;; MVRA from call
(return 2) ;; RA from call
(end-arity)
@ -158,10 +160,12 @@
'((begin-program call-with-3
((name . call-with-3)))
(begin-standard-arity (f) 3 #f)
(load-constant 2 3)
(call 3 1 (2))
(return 3) ;; MVRA from call
(return 3) ;; RA from call
(push-frame 2 2)
(mov 5 1)
(load-constant 6 3)
(call 2)
(return 2) ;; MVRA from call
(return 2) ;; RA from call
(end-arity)
(end-program)))))
(call-with-3 (lambda (x) (* x 2))))))