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

compile ecmascript's parser. yay! instant load-time!

* module/language/ghil/compile-glil.scm (codegen): If there are more than
  255 arguments, make a list and use apply instead of calling directly.

* module/language/Makefile.am: Now we can compile parse.scm. Yay!

* module/language/scheme/compile-ghil.scm: Add a note.

* module/language/ecmascript/compile-ghil.scm: Add a note.
This commit is contained in:
Andy Wingo 2009-02-21 20:07:57 +01:00
parent 594d9d4c48
commit aec8febc46
4 changed files with 13 additions and 5 deletions

View file

@ -382,7 +382,14 @@
;; ARGS...
;; ([tail-]call NARGS)
(comp-push proc)
(push-call! loc (if tail 'goto/args 'call) args)
(let ((nargs (length args)))
(cond ((< nargs 255)
(push-call! loc (if tail 'goto/args 'call) args))
(else
(push-call! loc 'mark '())
(for-each comp-push args)
(push-call! loc 'list-mark '())
(push-code! loc (make-glil-call (if tail 'goto/apply 'apply) 2)))))
(maybe-drop))
((<ghil-mv-call> env loc producer consumer)