mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-20 22:29:16 +02:00
Remove dead code
This commit is contained in:
parent
8064ebef5f
commit
00c2ab4e39
1 changed files with 6 additions and 38 deletions
|
@ -347,8 +347,7 @@
|
||||||
primitive-procedures))
|
primitive-procedures))
|
||||||
|
|
||||||
(define (apply-primitive-procedure proc args)
|
(define (apply-primitive-procedure proc args)
|
||||||
(apply ;apply-in-underlying-scheme
|
(apply (primitive-implementation proc) args))
|
||||||
(primitive-implementation proc) args))
|
|
||||||
|
|
||||||
;; TODO: temporary testing
|
;; TODO: temporary testing
|
||||||
;; also, it would be nice to pass around something other than
|
;; also, it would be nice to pass around something other than
|
||||||
|
@ -568,9 +567,7 @@
|
||||||
(lambda-body exp)
|
(lambda-body exp)
|
||||||
a-env
|
a-env
|
||||||
rename-env
|
rename-env
|
||||||
(append a-lookup local-renamed)
|
(append a-lookup local-renamed))))
|
||||||
;local-renamed ;; TODO: (append a-lookup local-renamed)
|
|
||||||
)))
|
|
||||||
(lambda (env) (make-procedure vars bproc env))))
|
(lambda (env) (make-procedure vars bproc env))))
|
||||||
|
|
||||||
(define (analyze-sequence exps a-env rename-env local-renamed)
|
(define (analyze-sequence exps a-env rename-env local-renamed)
|
||||||
|
@ -603,38 +600,13 @@
|
||||||
(if (Cyc-macro? macro-op)
|
(if (Cyc-macro? macro-op)
|
||||||
;; Compiled macro, call directly
|
;; Compiled macro, call directly
|
||||||
(let ((expanded
|
(let ((expanded
|
||||||
(macro:expand exp (list 'macro macro-op) a-env rename-env local-renamed)
|
(macro:expand exp (list 'macro macro-op) a-env rename-env local-renamed)))
|
||||||
;(apply macro-op
|
|
||||||
; (list (cons (car exp) (operands exp))
|
|
||||||
; (Cyc-er-rename rename-env a-env '())
|
|
||||||
; (Cyc-er-compare? rename-env a-env)))
|
|
||||||
))
|
|
||||||
;(display "/* ")
|
|
||||||
;(write `(DEBUG expand ,exp ))
|
|
||||||
;(newline)
|
|
||||||
;(write `(EXPANDED ,expanded))
|
|
||||||
;(display "*/ ")
|
|
||||||
;(newline)
|
|
||||||
(analyze expanded
|
(analyze expanded
|
||||||
a-env
|
a-env
|
||||||
rename-env
|
rename-env
|
||||||
local-renamed))
|
local-renamed))
|
||||||
;; Interpreted macro, build expression and eval
|
;; Interpreted macro, build expression and eval
|
||||||
(let* (;(expr (cons macro-op
|
(let* ((expanded (macro:expand exp (list 'macro macro-op) a-env rename-env local-renamed)))
|
||||||
; (list (cons 'quote
|
|
||||||
; (list (cons (car exp)
|
|
||||||
; (operands exp))))
|
|
||||||
; (Cyc-er-rename rename-env a-env '())
|
|
||||||
; (Cyc-er-compare? rename-env a-env))))
|
|
||||||
; (expanded (eval expr a-env)) ;; Expand macro
|
|
||||||
(expanded (macro:expand exp (list 'macro macro-op) a-env rename-env local-renamed))
|
|
||||||
)
|
|
||||||
;(display "/* ")
|
|
||||||
;(write `(DEBUG expand ,exp))
|
|
||||||
;(newline)
|
|
||||||
;(write `(EXPANDED ,expanded))
|
|
||||||
;(display "*/ ")
|
|
||||||
;(newline)
|
|
||||||
(analyze
|
(analyze
|
||||||
expanded
|
expanded
|
||||||
a-env
|
a-env
|
||||||
|
@ -1277,9 +1249,7 @@
|
||||||
;(log `(DONE WITH macro:expand))
|
;(log `(DONE WITH macro:expand))
|
||||||
(_expand-body
|
(_expand-body
|
||||||
result
|
result
|
||||||
(cons
|
(cons expanded (cdr exp))
|
||||||
expanded ;(macro:expand this-exp val env)
|
|
||||||
(cdr exp))
|
|
||||||
env
|
env
|
||||||
rename-env
|
rename-env
|
||||||
local-env
|
local-env
|
||||||
|
@ -1288,9 +1258,7 @@
|
||||||
(let ((expanded (macro:expand this-exp (list 'macro val) env rename-env local-renamed)))
|
(let ((expanded (macro:expand this-exp (list 'macro val) env rename-env local-renamed)))
|
||||||
(_expand-body
|
(_expand-body
|
||||||
result
|
result
|
||||||
(cons
|
(cons expanded (cdr exp))
|
||||||
expanded ;(macro:expand this-exp val env)
|
|
||||||
(cdr exp))
|
|
||||||
env
|
env
|
||||||
rename-env
|
rename-env
|
||||||
local-env
|
local-env
|
||||||
|
|
Loading…
Add table
Reference in a new issue