Review node/variable interface imports

This commit is contained in:
Andrew Whatson 2022-08-15 12:41:41 +10:00
parent 7a6e0ff177
commit c1166c1d1b
19 changed files with 27 additions and 18 deletions

View file

@ -20,6 +20,7 @@
#:use-module (ps-compiler node node)
#:use-module (ps-compiler node node-util)
#:use-module (ps-compiler node primop)
#:use-module (ps-compiler node variable)
#:use-module (ps-compiler util util)
#:export (cps-call cps-sequence))

View file

@ -28,6 +28,7 @@
#:use-module (ps-compiler node node-letrec)
#:use-module (ps-compiler node node-util)
#:use-module (ps-compiler node primop)
#:use-module (ps-compiler node variable)
#:use-module (ps-compiler param)
#:use-module (ps-compiler util ssa)
#:use-module (ps-compiler util util)

View file

@ -69,6 +69,7 @@
#:use-module (ps-compiler node node)
#:use-module (ps-compiler node node-util)
#:use-module (ps-compiler node primop)
#:use-module (ps-compiler node variable)
#:use-module (ps-compiler param)
#:use-module (ps-compiler util util)
#:export (let-nodes new-lambda new-call))

View file

@ -13,6 +13,7 @@
#:use-module (ps-compiler node node)
#:use-module (ps-compiler node node-util)
#:use-module (ps-compiler node primop)
#:use-module (ps-compiler node variable)
#:use-module (ps-compiler util util)
#:export (check-node))

View file

@ -11,6 +11,7 @@
(define-module (ps-compiler node node-equal)
#:use-module (prescheme scheme48)
#:use-module (ps-compiler node node)
#:use-module (ps-compiler node variable)
#:export (node-equal?))
(define (node-equal? n1 n2)

View file

@ -16,6 +16,7 @@
#:use-module (ps-compiler node node)
#:use-module (ps-compiler node node-util)
#:use-module (ps-compiler node primop)
#:use-module (ps-compiler node variable)
#:export (put-in-letrec make-letrec))
;;-------------------------------------------------------------------------------

View file

@ -17,6 +17,7 @@
#:use-module (ps-compiler node let-nodes)
#:use-module (ps-compiler node node)
#:use-module (ps-compiler node primop)
#:use-module (ps-compiler node variable)
#:use-module (ps-compiler param)
#:use-module (ps-compiler util util)
#:export (node-base containing-procedure

View file

@ -72,6 +72,7 @@
#:use-module (ps-compiler node node)
#:use-module (ps-compiler node node-util)
#:use-module (ps-compiler node primop)
#:use-module (ps-compiler node variable)
#:use-module (ps-compiler util util)
#:export (pp-cps))

View file

@ -17,6 +17,7 @@
#:use-module (prescheme s48-defrecord)
#:use-module (ps-compiler node node)
#:use-module (ps-compiler node primop)
#:use-module (ps-compiler node variable)
#:use-module (ps-compiler param)
#:use-module (ps-compiler util expand-vec)
#:use-module (ps-compiler util util)

View file

@ -13,6 +13,7 @@
#:use-module (prescheme ps-defenum)
#:use-module (prescheme bcomp node)
#:use-module (ps-compiler node primop)
#:use-module (ps-compiler node variable)
#:use-module ((ps-compiler prescheme form) #:select (form-value form-var))
#:use-module (ps-compiler prescheme primitive)
#:export (display-forms-as-scheme))

View file

@ -11,6 +11,7 @@
(define-module (ps-compiler prescheme expand)
#:use-module (prescheme scheme48)
#:use-module (prescheme bcomp node)
#:use-module (ps-compiler node variable)
#:use-module (ps-compiler util util)
#:use-module (ps-compiler prescheme eval)
#:use-module (ps-compiler prescheme primitive)

View file

@ -12,12 +12,14 @@
#:use-module (prescheme scheme48)
#:use-module (prescheme s48-defrecord)
#:use-module (prescheme record-discloser)
#:use-module ((prescheme bcomp node) #:select (node? node-predicate) #:prefix bcomp-)
#:use-module (ps-compiler front top)
#:use-module (ps-compiler node let-nodes)
#:use-module (ps-compiler node node)
#:use-module (ps-compiler node node-equal)
#:use-module (ps-compiler node node-util)
#:use-module (ps-compiler node primop)
#:use-module (ps-compiler node variable)
#:use-module (ps-compiler node vector)
#:use-module (ps-compiler prescheme primop primop)
#:use-module (ps-compiler prescheme type)
@ -287,23 +289,16 @@
(eq? 'no (form-integrate f)))
(form-providers f))
(memq? f (form-providers f))
(and (scheme-node? (form-value f))
(scheme-literal-node? (form-value f)))))
(and (bcomp-node? (form-value f))
(bcomp-literal-node? (form-value f)))))
forms)
(begin (set! *loop-forms* forms)
(let ((f (breakpoint "Break dependency loop: *loop-forms* = ~S" forms)))
(set! *loop-forms* #f)
f))))
(define scheme-literal-node?
;; FIXME: port scheme/bcomp/node.scm
;; ((structure-ref nodes node-predicate) 'literal)
)
(define scheme-node?
;; FIXME: port scheme/bcomp/node.scm
;; (structure-ref nodes node?)
)
(define bcomp-literal-node?
(bcomp-node-predicate 'literal))
;;----------------------------------------------------------------

View file

@ -8,7 +8,9 @@
(define-module (ps-compiler prescheme front-end)
#:use-module (prescheme scheme48)
#:use-module (ps-compiler node node)
#:use-module ((prescheme bcomp node) #:select (node?) #:prefix bcomp-)
#:use-module ((ps-compiler node node) #:select (reset-node-id))
#:use-module (ps-compiler node variable)
#:use-module (ps-compiler prescheme form)
#:use-module ((ps-compiler prescheme record) #:select (reset-record-data!))
#:use-module (ps-compiler prescheme type)
@ -97,11 +99,6 @@
(and (variable? var)
(maybe-variable->form var))))
(define scheme-node?
;; FIXME: port scheme/bcomp/node.scm
;; (structure-ref nodes node?)
)
(define bcomp-schemify
;; FIXME: port scheme/bcomp/schemify.scm
;; (structure-ref nodes schemify)
@ -119,7 +116,7 @@
(let* ((value (form-value form))
(var (form-var form))
(name (form-name form))
(value-type (cond ((scheme-node? value)
(value-type (cond ((bcomp-node? value)
(infer-definition-type value (source-proc form)))
((variable? value)
(get-package-variable-type value))

View file

@ -15,6 +15,7 @@
#:use-module (ps-compiler node node)
#:use-module (ps-compiler node node-util)
#:use-module (ps-compiler node primop)
#:use-module (ps-compiler node variable)
#:use-module (ps-compiler prescheme type)
#:use-module (ps-compiler prescheme primop primop)
#:use-module (ps-compiler util util)

View file

@ -18,6 +18,7 @@
#:use-module (ps-compiler node node-letrec)
#:use-module (ps-compiler node node-util)
#:use-module (ps-compiler node primop)
#:use-module (ps-compiler node variable)
#:use-module (ps-compiler param)
#:use-module (ps-compiler prescheme form)
#:use-module (ps-compiler prescheme front-end)

View file

@ -14,6 +14,7 @@
#:use-module (ps-compiler node node-equal)
#:use-module (ps-compiler node node-util)
#:use-module (ps-compiler node primop)
#:use-module (ps-compiler node variable)
#:use-module (ps-compiler param)
#:use-module (ps-compiler simp simplify)
#:use-module (ps-compiler util util)

View file

@ -13,6 +13,7 @@
#:use-module (ps-compiler node node)
#:use-module (ps-compiler node node-util)
#:use-module (ps-compiler node primop)
#:use-module (ps-compiler node variable)
#:export (substitute-join-arguments))
;; Call JOIN-SUBSTITUTE on all variable/value pairs.

View file

@ -12,6 +12,7 @@
#:use-module (ps-compiler node node)
#:use-module (ps-compiler node node-util)
#:use-module (ps-compiler node primop)
#:use-module (ps-compiler node variable)
#:use-module (ps-compiler param)
#:use-module (ps-compiler simp join)
#:use-module (ps-compiler simp simplify)

View file

@ -21,6 +21,7 @@
#:use-module (ps-compiler node node)
#:use-module (ps-compiler node node-util)
#:use-module (ps-compiler node primop)
#:use-module (ps-compiler node variable)
#:use-module (ps-compiler node vector)
#:export (simplify-node
default-simplifier