mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-14 00:07:36 +02:00
Handle + and * without any args
This commit is contained in:
parent
17be2dc09a
commit
20a73cac64
1 changed files with 9 additions and 3 deletions
|
@ -1062,10 +1062,16 @@
|
|||
(cons (car ast)
|
||||
(map (lambda (a) (convert a renamed))
|
||||
(cdr ast)))))
|
||||
(if (precompute-prim-app? converted)
|
||||
converted ; TODO:(eval converted) ;; OK, evaluate at compile time
|
||||
(cond
|
||||
((and (equal? (car converted) '+) (= (length converted) 1))
|
||||
0)
|
||||
((and (equal? (car converted) '*) (= (length converted) 1))
|
||||
1)
|
||||
((precompute-prim-app? converted)
|
||||
converted) ; TODO:(eval converted) ;; OK, evaluate at compile time
|
||||
;converted))) ;; No, see if we can fast-convert it
|
||||
(prim:inline-convert-prim-call converted)))) ;; No, see if we can fast-convert it
|
||||
(else
|
||||
(prim:inline-convert-prim-call converted))))) ;; No, see if we can fast-convert it
|
||||
((lambda? ast)
|
||||
(let* ((args (lambda-formals->list ast))
|
||||
(ltype (lambda-formals-type ast))
|
||||
|
|
Loading…
Add table
Reference in a new issue