diff --git a/compiler.rkt b/compiler.rkt index e51a712..1fbe097 100644 --- a/compiler.rkt +++ b/compiler.rkt @@ -961,7 +961,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)] @@ -1020,7 +1020,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. @@ -1030,7 +1030,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), @@ -2079,10 +2079,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) diff --git a/simulator/simulator.rkt b/simulator/simulator.rkt index 1af0a53..abc4399 100644 --- a/simulator/simulator.rkt +++ b/simulator/simulator.rkt @@ -261,10 +261,16 @@ (let: ([a-top : toplevel (ensure-toplevel (env-ref m (CheckToplevelBound!-depth op)))]) (when (> (CheckToplevelBound!-pos op) (length (toplevel-vals a-top))) - (printf "ERROR: toplevel is length ~s, but trying to refer to ~s.\n\n~s" + (printf "ERROR: toplevel is length ~s, but trying to refer to ~s.\n\n~s\n" (length (toplevel-vals a-top)) (CheckToplevelBound!-pos op) - (toplevel-names a-top))) + (toplevel-names a-top)) + (for ([i (in-range (length (machine-env m)))]) + (let ([elt (env-ref m (ensure-natural i))]) + (when (toplevel? elt) + (printf "element ~s ia a toplevel of length ~s\n" + i (length (toplevel-names elt)))))) + (flush-output (current-output-port))) (cond [(undefined? (list-ref (toplevel-vals a-top) (CheckToplevelBound!-pos op))) (error 'check-toplevel-bound! "Unbound identifier ~s" @@ -317,7 +323,6 @@ (let: ([a-proc : SlotValue (machine-proc m)]) (cond [(closure? a-proc) - (printf "installing values ~s\n" (closure-vals a-proc)) (env-push-many! m (closure-vals a-proc))] [else (error 'step-perform "Procedure register doesn't hold a procedure: ~s"