mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-06 15:40:29 +02:00
inline symbol? and vector? to opcodes, and a psyntax inlining tweak
* libguile/vm-i-scheme.c (symbol?, vector?): New instructions. Renumbered the rest. * libguile/vm-i-system.c: Renumber instructions. * libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Bump. * module/ice-9/psyntax.scm (binding-type, binding-value): Define using macros so that we inline to car and cdr opcodes. Oh, for an inliner :) * module/language/tree-il/compile-glil.scm (*primcall-ops*) * module/language/tree-il/primitives.scm (*interesting-primitive-names*, *effect-free-primitives*) (*effect+exception-free-primitives*): Add symbol? and vector? inlines.
This commit is contained in:
parent
1ecf39a6a7
commit
cf45ff030c
6 changed files with 186 additions and 168 deletions
|
@ -554,8 +554,12 @@
|
|||
((_ type value) (cons type value))
|
||||
((_ 'type) '(type))
|
||||
((_ type) (cons type '()))))
|
||||
(define binding-type car)
|
||||
(define binding-value cdr)
|
||||
(define-syntax binding-type
|
||||
(syntax-rules ()
|
||||
((_ x) (car x))))
|
||||
(define-syntax binding-value
|
||||
(syntax-rules ()
|
||||
((_ x) (cdr x))))
|
||||
|
||||
(define-syntax null-env (identifier-syntax '()))
|
||||
|
||||
|
|
|
@ -105,6 +105,8 @@
|
|||
((set-cdr! . 2) . set-cdr!)
|
||||
((null? . 1) . null?)
|
||||
((list? . 1) . list?)
|
||||
((symbol? . 1) . symbol?)
|
||||
((vector? . 1) . vector?)
|
||||
(list . list)
|
||||
(vector . vector)
|
||||
((class-of . 1) . class-of)
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
+ * - / 1- 1+ quotient remainder modulo
|
||||
ash logand logior logxor
|
||||
not
|
||||
pair? null? list? acons cons cons*
|
||||
pair? null? list? symbol? vector? acons cons cons*
|
||||
|
||||
list vector
|
||||
|
||||
|
@ -112,7 +112,7 @@
|
|||
= < > <= >= zero?
|
||||
+ * - / 1- 1+ quotient remainder modulo
|
||||
not
|
||||
pair? null? list? acons cons cons*
|
||||
pair? null? list? symbol? vector? acons cons cons*
|
||||
list vector
|
||||
car cdr
|
||||
caar cadr cdar cddr
|
||||
|
@ -137,7 +137,7 @@
|
|||
'(values
|
||||
eq? eqv? equal?
|
||||
not
|
||||
pair? null? list? acons cons cons*
|
||||
pair? null? list? symbol? vector? acons cons cons*
|
||||
list vector
|
||||
struct?))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue