From 5f06c39d6784e1f188defea84ac19db85350972e Mon Sep 17 00:00:00 2001 From: Danny Yoo Date: Tue, 8 Mar 2011 18:34:23 -0500 Subject: [PATCH] comments --- compile.rkt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/compile.rkt b/compile.rkt index dc6314e..6da4fd6 100644 --- a/compile.rkt +++ b/compile.rkt @@ -383,18 +383,19 @@ cenv (make-instruction-sequence `(,(make-AssignPrimOpStatement - ;; optimization: we can put the result directly in the registers, or in - ;; the appropriate spot on the stack. + ;; Optimization: we put the result directly in the registers, or in + ;; the appropriate spot on the stack. This takes into account the popenviroment + ;; that happens right afterwards. (cond [(eq? target 'val) 'val] [(eq? target 'proc) 'proc] [(EnvLexicalReference? target) + ;; The optimization is right here. (make-EnvLexicalReference (+ (EnvLexicalReference-depth target) n))]) (make-ApplyPrimitiveProcedure n)) ,(make-PopEnvironment n 0)))) - after-call))))