mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-25 04:55:04 +02:00
Issue #76
Compile a faster version of `apply` when only two arguments are received.
This commit is contained in:
parent
da51147b68
commit
be8ad49ac4
2 changed files with 12 additions and 0 deletions
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
## 0.7.2 - TBD
|
## 0.7.2 - TBD
|
||||||
|
|
||||||
|
Features
|
||||||
|
|
||||||
|
- Compile a faster version of `apply` when only two arguments are received.
|
||||||
|
|
||||||
Bug Fixes
|
Bug Fixes
|
||||||
|
|
||||||
- Fixed many functions including `utf8->string`, `string->utf8`, `bytevector-copy`, `list->vector`, and `list->string` to heap allocate objects that exceed the maximum size for objects on the stack.
|
- Fixed many functions including `utf8->string`, `string->utf8`, `bytevector-copy`, `list->vector`, and `list->string` to heap allocate objects that exceed the maximum size for objects on the stack.
|
||||||
|
|
|
@ -105,6 +105,7 @@
|
||||||
>=
|
>=
|
||||||
<=
|
<=
|
||||||
apply
|
apply
|
||||||
|
Cyc-fast-apply
|
||||||
%halt
|
%halt
|
||||||
exit
|
exit
|
||||||
system
|
system
|
||||||
|
@ -240,6 +241,7 @@
|
||||||
(>= 2 #f)
|
(>= 2 #f)
|
||||||
(<= 2 #f)
|
(<= 2 #f)
|
||||||
(apply 1 #f)
|
(apply 1 #f)
|
||||||
|
(Cyc-fast-apply 2 #f)
|
||||||
(%halt 1 1)
|
(%halt 1 1)
|
||||||
(exit 1 1)
|
(exit 1 1)
|
||||||
(system 1 1)
|
(system 1 1)
|
||||||
|
@ -486,6 +488,7 @@
|
||||||
((eq? p '>=) "Cyc_num_gte")
|
((eq? p '>=) "Cyc_num_gte")
|
||||||
((eq? p '<=) "Cyc_num_lte")
|
((eq? p '<=) "Cyc_num_lte")
|
||||||
((eq? p 'apply) "apply_va")
|
((eq? p 'apply) "apply_va")
|
||||||
|
((eq? p 'Cyc-fast-apply) "apply")
|
||||||
((eq? p '%halt) "__halt")
|
((eq? p '%halt) "__halt")
|
||||||
((eq? p 'exit) "__halt")
|
((eq? p 'exit) "__halt")
|
||||||
((eq? p 'Cyc-default-exception-handler) "Cyc_default_exception_handler")
|
((eq? p 'Cyc-default-exception-handler) "Cyc_default_exception_handler")
|
||||||
|
@ -632,6 +635,7 @@
|
||||||
<=
|
<=
|
||||||
Cyc-fast-member
|
Cyc-fast-member
|
||||||
Cyc-fast-assoc
|
Cyc-fast-assoc
|
||||||
|
Cyc-fast-apply
|
||||||
apply
|
apply
|
||||||
car
|
car
|
||||||
cdr
|
cdr
|
||||||
|
@ -743,6 +747,7 @@
|
||||||
((eq? p 'string->number) "object")
|
((eq? p 'string->number) "object")
|
||||||
((eq? p 'string-append) "object")
|
((eq? p 'string-append) "object")
|
||||||
((eq? p 'apply) "object")
|
((eq? p 'apply) "object")
|
||||||
|
((eq? p 'Cyc-fast-apply) "object")
|
||||||
((eq? p 'Cyc-read-line) "object")
|
((eq? p 'Cyc-read-line) "object")
|
||||||
((eq? p 'Cyc-read-char) "object")
|
((eq? p 'Cyc-read-char) "object")
|
||||||
((eq? p 'Cyc-peek-char) "object")
|
((eq? p 'Cyc-peek-char) "object")
|
||||||
|
@ -802,6 +807,7 @@
|
||||||
Cyc-fast-char-gte
|
Cyc-fast-char-gte
|
||||||
Cyc-fast-char-lte
|
Cyc-fast-char-lte
|
||||||
+ - * / apply
|
+ - * / apply
|
||||||
|
Cyc-fast-apply
|
||||||
= > < >= <=
|
= > < >= <=
|
||||||
command-line-arguments
|
command-line-arguments
|
||||||
Cyc-read-line
|
Cyc-read-line
|
||||||
|
@ -813,6 +819,7 @@
|
||||||
(define (prim:cont? exp)
|
(define (prim:cont? exp)
|
||||||
(and (prim? exp)
|
(and (prim? exp)
|
||||||
(member exp '(Cyc-read-line apply command-line-arguments number->string
|
(member exp '(Cyc-read-line apply command-line-arguments number->string
|
||||||
|
Cyc-fast-apply
|
||||||
+ - * /
|
+ - * /
|
||||||
= > < >= <=
|
= > < >= <=
|
||||||
Cyc-list
|
Cyc-list
|
||||||
|
@ -914,6 +921,7 @@
|
||||||
((and (equal? (car prim-call) '<) (= (length prim-call) 3)) (cons 'Cyc-fast-lt (cdr prim-call)))
|
((and (equal? (car prim-call) '<) (= (length prim-call) 3)) (cons 'Cyc-fast-lt (cdr prim-call)))
|
||||||
((and (equal? (car prim-call) '>=) (= (length prim-call) 3)) (cons 'Cyc-fast-gte (cdr prim-call)))
|
((and (equal? (car prim-call) '>=) (= (length prim-call) 3)) (cons 'Cyc-fast-gte (cdr prim-call)))
|
||||||
((and (equal? (car prim-call) '<=) (= (length prim-call) 3)) (cons 'Cyc-fast-lte (cdr prim-call)))
|
((and (equal? (car prim-call) '<=) (= (length prim-call) 3)) (cons 'Cyc-fast-lte (cdr prim-call)))
|
||||||
|
((and (equal? (car prim-call) 'apply) (= (length prim-call) 3)) (cons 'Cyc-fast-apply (cdr prim-call)))
|
||||||
(else
|
(else
|
||||||
prim-call)))
|
prim-call)))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue