disabling optimizations again; trying to trace test-conform's failure
This commit is contained in:
parent
664f778da6
commit
1ab9eeee78
5
Makefile
5
Makefile
|
@ -6,3 +6,8 @@ test-compiler:
|
||||||
test-earley:
|
test-earley:
|
||||||
raco make -v --disable-inline test-earley.rkt
|
raco make -v --disable-inline test-earley.rkt
|
||||||
racket test-earley.rkt
|
racket test-earley.rkt
|
||||||
|
|
||||||
|
|
||||||
|
test-conform:
|
||||||
|
raco make -v --disable-inline test-conform.rkt
|
||||||
|
racket test-conform.rkt
|
||||||
|
|
13
compiler.rkt
13
compiler.rkt
|
@ -965,7 +965,7 @@
|
||||||
(ModuleVariable-module-name op-knowledge))
|
(ModuleVariable-module-name op-knowledge))
|
||||||
'#%kernel)
|
'#%kernel)
|
||||||
(let ([op (ModuleVariable-name op-knowledge)])
|
(let ([op (ModuleVariable-name op-knowledge)])
|
||||||
(cond [(KernelPrimitiveName/Inline? op)
|
(cond #;[(KernelPrimitiveName/Inline? op)
|
||||||
(compile-kernel-primitive-application
|
(compile-kernel-primitive-application
|
||||||
op
|
op
|
||||||
exp cenv target linkage)]
|
exp cenv target linkage)]
|
||||||
|
@ -1025,7 +1025,7 @@
|
||||||
linkage))))
|
linkage))))
|
||||||
|
|
||||||
|
|
||||||
(: compile-kernel-primitive-application
|
#;(: compile-kernel-primitive-application
|
||||||
(KernelPrimitiveName/Inline App CompileTimeEnvironment Target Linkage -> InstructionSequence))
|
(KernelPrimitiveName/Inline App CompileTimeEnvironment Target Linkage -> InstructionSequence))
|
||||||
;; This is a special case of application, where the operator is statically
|
;; This is a special case of application, where the operator is statically
|
||||||
;; known to be in the set of hardcoded primitives.
|
;; known to be in the set of hardcoded primitives.
|
||||||
|
@ -1035,7 +1035,7 @@
|
||||||
;; stack slots, we can do less than that.
|
;; stack slots, we can do less than that.
|
||||||
;;
|
;;
|
||||||
;; We have to be sensitive to mutation.
|
;; We have to be sensitive to mutation.
|
||||||
(define (compile-kernel-primitive-application kernel-op exp cenv target linkage)
|
#;(define (compile-kernel-primitive-application kernel-op exp cenv target linkage)
|
||||||
(let ([singular-context-check (emit-singular-context linkage)])
|
(let ([singular-context-check (emit-singular-context linkage)])
|
||||||
(cond
|
(cond
|
||||||
;; If all the arguments are primitive enough (all constants, localrefs, or toplevelrefs),
|
;; If all the arguments are primitive enough (all constants, localrefs, or toplevelrefs),
|
||||||
|
@ -1628,7 +1628,8 @@
|
||||||
;; We should do more here eventually, including things like type inference or flow analysis, so that
|
;; We should do more here eventually, including things like type inference or flow analysis, so that
|
||||||
;; we can generate better code.
|
;; we can generate better code.
|
||||||
(define (extract-static-knowledge exp cenv)
|
(define (extract-static-knowledge exp cenv)
|
||||||
(cond
|
'?
|
||||||
|
#;(cond
|
||||||
[(Lam? exp)
|
[(Lam? exp)
|
||||||
(make-StaticallyKnownLam (Lam-name exp)
|
(make-StaticallyKnownLam (Lam-name exp)
|
||||||
(Lam-entry-label exp)
|
(Lam-entry-label exp)
|
||||||
|
@ -2088,10 +2089,10 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(: adjust-expression-depth (Expression Natural Natural -> Expression))
|
#;(: adjust-expression-depth (Expression Natural Natural -> Expression))
|
||||||
;; Redirects references to the stack to route around a region of size n.
|
;; Redirects references to the stack to route around a region of size n.
|
||||||
;; The region begins at offset skip into the environment.
|
;; The region begins at offset skip into the environment.
|
||||||
(define (adjust-expression-depth exp n skip)
|
#;(define (adjust-expression-depth exp n skip)
|
||||||
(cond
|
(cond
|
||||||
[(Top? exp)
|
[(Top? exp)
|
||||||
(make-Top (Top-prefix exp)
|
(make-Top (Top-prefix exp)
|
||||||
|
|
|
@ -13,9 +13,11 @@
|
||||||
|
|
||||||
(: optimize-il ((Listof Statement) -> (Listof Statement)))
|
(: optimize-il ((Listof Statement) -> (Listof Statement)))
|
||||||
(define (optimize-il statements)
|
(define (optimize-il statements)
|
||||||
|
|
||||||
|
statements
|
||||||
;; For now, replace pairs of PushEnvironment / AssignImmediate(0, ...)
|
;; For now, replace pairs of PushEnvironment / AssignImmediate(0, ...)
|
||||||
;; We should do some more optimizations here, like peephole...
|
;; We should do some more optimizations here, like peephole...
|
||||||
(let loop ([statements (filter not-no-op? statements)])
|
#;(let loop ([statements (filter not-no-op? statements)])
|
||||||
(cond
|
(cond
|
||||||
[(empty? statements)
|
[(empty? statements)
|
||||||
empty]
|
empty]
|
||||||
|
|
|
@ -54,5 +54,5 @@
|
||||||
|
|
||||||
(test (read (open-input-file "tests/conform/program0.sch"))
|
(test (read (open-input-file "tests/conform/program0.sch"))
|
||||||
(port->string (open-input-file "tests/conform/expected0.txt"))
|
(port->string (open-input-file "tests/conform/expected0.txt"))
|
||||||
;;#:debug? #t
|
#:debug? #t
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user