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:
|
||||
raco make -v --disable-inline 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))
|
||||
'#%kernel)
|
||||
(let ([op (ModuleVariable-name op-knowledge)])
|
||||
(cond [(KernelPrimitiveName/Inline? op)
|
||||
(cond #;[(KernelPrimitiveName/Inline? op)
|
||||
(compile-kernel-primitive-application
|
||||
op
|
||||
exp cenv target linkage)]
|
||||
|
@ -1025,7 +1025,7 @@
|
|||
linkage))))
|
||||
|
||||
|
||||
(: compile-kernel-primitive-application
|
||||
#;(: compile-kernel-primitive-application
|
||||
(KernelPrimitiveName/Inline App CompileTimeEnvironment Target Linkage -> InstructionSequence))
|
||||
;; This is a special case of application, where the operator is statically
|
||||
;; known to be in the set of hardcoded primitives.
|
||||
|
@ -1035,7 +1035,7 @@
|
|||
;; stack slots, we can do less than that.
|
||||
;;
|
||||
;; 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)])
|
||||
(cond
|
||||
;; 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 can generate better code.
|
||||
(define (extract-static-knowledge exp cenv)
|
||||
(cond
|
||||
'?
|
||||
#;(cond
|
||||
[(Lam? exp)
|
||||
(make-StaticallyKnownLam (Lam-name 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.
|
||||
;; The region begins at offset skip into the environment.
|
||||
(define (adjust-expression-depth exp n skip)
|
||||
#;(define (adjust-expression-depth exp n skip)
|
||||
(cond
|
||||
[(Top? exp)
|
||||
(make-Top (Top-prefix exp)
|
||||
|
|
|
@ -13,9 +13,11 @@
|
|||
|
||||
(: optimize-il ((Listof Statement) -> (Listof Statement)))
|
||||
(define (optimize-il statements)
|
||||
|
||||
statements
|
||||
;; For now, replace pairs of PushEnvironment / AssignImmediate(0, ...)
|
||||
;; 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
|
||||
[(empty? statements)
|
||||
empty]
|
||||
|
|
|
@ -54,5 +54,5 @@
|
|||
|
||||
(test (read (open-input-file "tests/conform/program0.sch"))
|
||||
(port->string (open-input-file "tests/conform/expected0.txt"))
|
||||
;;#:debug? #t
|
||||
#:debug? #t
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user