1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 09:10:22 +02:00

Remove special optimizer and backend support for pairs

* module/language/cps/compile-bytecode.scm (compile-function):
* module/language/cps/cse.scm (compute-equivalent-subexpressions):
* module/language/cps/dce.scm (compute-live-code):
* module/language/cps/effects-analysis.scm:
* module/language/cps/types.scm: Remove support for cons, car, etc
  primcalls.
* module/language/cps/effects-analysis.scm (&car, &cdr): Remove
  undefined exports.
* module/system/vm/assembler.scm: Remove emit-cons, etc exports.
This commit is contained in:
Andy Wingo 2018-01-07 18:24:15 +01:00
parent 49fa4980bb
commit abfe04835b
6 changed files with 2 additions and 44 deletions

View file

@ -56,8 +56,6 @@
&fluid
&prompt
&car
&cdr
&vector
&box
&module
@ -383,19 +381,6 @@ the LABELS that are clobbered by the effects of LABEL."
(&write-field
(annotation->memory-kind ann) idx)))))
;; Pairs.
(define-primitive-effects
((cons a b) (&allocate &pair))
((list . _) (&allocate &pair))
((car x) (&read-field &pair 0) &type-check)
((set-car! x y) (&write-field &pair 0) &type-check)
((cdr x) (&read-field &pair 1) &type-check)
((set-cdr! x y) (&write-field &pair 1) &type-check)
((memq x y) (&read-object &pair) &type-check)
((memv x y) (&read-object &pair) &type-check)
((list? arg) (&read-field &pair 1))
((length l) (&read-field &pair 1) &type-check))
;; Variables.
(define-primitive-effects
((box v) (&allocate &box))