mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-03-13 08:20:31 -07:00
+NARGS-VAR+ and the like moved into C-BACKEND.
This commit is contained in:
parent
e3d77afd61
commit
17ffbd3d3d
3 changed files with 14 additions and 10 deletions
|
|
@ -230,6 +230,13 @@
|
|||
(loop for (v . required-loc) in var-loc-pairs
|
||||
do (bind required-loc v)))
|
||||
|
||||
(defconstant +simple-va-args+ (make-symbol "args"))
|
||||
(defconstant +cl-va-args+ (make-symbol "cl_args"))
|
||||
(defconstant +nargs-var+ (make-symbol "narg"))
|
||||
|
||||
(defun simple-varargs-loc-p (var)
|
||||
(string= (var-name var) +simple-va-args+))
|
||||
|
||||
(defun c2varargs-bind-op (nargs-loc varargs-loc minargs maxargs nkeywords check)
|
||||
(open-c-block)
|
||||
(wt-comment "Arguments parsing - begin")
|
||||
|
|
|
|||
|
|
@ -195,13 +195,13 @@
|
|||
(setf compiled-body (c1requireds requireds ss is ts))
|
||||
(let* ((nkeys (pop keywords)))
|
||||
(when (or optionals rest keywords)
|
||||
(setf nargs (make-var :name +nargs-var+ :type 'FIXNUM
|
||||
(setf nargs (make-var :name c-backend:+nargs-var+ :type 'FIXNUM
|
||||
:loc '(VV "narg" 0)
|
||||
:kind :fixnum)
|
||||
varargs (if (and (not (or rest keywords allow-other-keys))
|
||||
(< maxargs 30))
|
||||
+simple-va-args+
|
||||
+cl-va-args+)
|
||||
c-backend:+simple-va-args+
|
||||
c-backend:+cl-va-args+)
|
||||
varargs (make-var :name varargs :type 'T
|
||||
:loc `(VV ,varargs 0)
|
||||
:kind :OBJECT)
|
||||
|
|
@ -296,13 +296,6 @@
|
|||
(t
|
||||
(c1progn 'VALUES+VALUE0 body))))
|
||||
|
||||
(defconstant +simple-va-args+ (make-symbol "args"))
|
||||
(defconstant +cl-va-args+ (make-symbol "cl_args"))
|
||||
(defconstant +nargs-var+ (make-symbol "narg"))
|
||||
|
||||
(defun simple-varargs-loc-p (var)
|
||||
(string= (var-name var) +simple-va-args+))
|
||||
|
||||
(defun c1requireds (requireds ss is ts)
|
||||
(c1bind-requireds
|
||||
(loop for i from 1
|
||||
|
|
|
|||
|
|
@ -200,6 +200,10 @@
|
|||
(defpackage "C-BACKEND"
|
||||
(:use "FFI" "CL" "C-DATA" "C-TYPES" "C-ENV" "C-PASSES" "C-LOG")
|
||||
(:export "CTOP-WRITE" "DUMP-ALL" "DATA-DUMP"
|
||||
"+SIMPLE-VA-ARGS+"
|
||||
"+CL-VA-ARGS+"
|
||||
"+NARGS-VAR+"
|
||||
"SIMPLE-VARARGS-LOC-P"
|
||||
"WT-FILTERED-DATA"))
|
||||
|
||||
(defpackage "C"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue