mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 12:35:05 +02:00
Validate the number of arguments passed to local function calls
This commit is contained in:
parent
caf1dc23ef
commit
debbde6849
2 changed files with 5 additions and 4 deletions
|
@ -5,7 +5,7 @@
|
||||||
Features
|
Features
|
||||||
|
|
||||||
- Faster record type constructors
|
- Faster record type constructors
|
||||||
TODO: is arg # validation sufficient??
|
- During compilation, validate the number of arguments passed to local function calls.
|
||||||
|
|
||||||
## 0.11.5 - October 30, 2019
|
## 0.11.5 - October 30, 2019
|
||||||
|
|
||||||
|
|
|
@ -2409,9 +2409,10 @@
|
||||||
;; Extract lambda definition
|
;; Extract lambda definition
|
||||||
(var (adb:get/default (car ast) #f))
|
(var (adb:get/default (car ast) #f))
|
||||||
(lam* (adbv:assigned-value var))
|
(lam* (adbv:assigned-value var))
|
||||||
((pair? lam*))
|
;; If assigned value is boxed in a cell, extract it
|
||||||
;; Assigned value is boxed in a cell, extract it
|
(lam (if (pair? lam*)
|
||||||
(lam (car lam*))
|
(car lam*)
|
||||||
|
lam*))
|
||||||
((ast:lambda? lam))
|
((ast:lambda? lam))
|
||||||
(formals-type (ast:lambda-formals-type lam))
|
(formals-type (ast:lambda-formals-type lam))
|
||||||
((equal? 'args:fixed formals-type)) ;; Could validate fixed-with-varargs, too
|
((equal? 'args:fixed formals-type)) ;; Could validate fixed-with-varargs, too
|
||||||
|
|
Loading…
Add table
Reference in a new issue