comments
This commit is contained in:
parent
683d67038c
commit
5f06c39d67
|
@ -383,18 +383,19 @@
|
||||||
cenv
|
cenv
|
||||||
(make-instruction-sequence
|
(make-instruction-sequence
|
||||||
`(,(make-AssignPrimOpStatement
|
`(,(make-AssignPrimOpStatement
|
||||||
;; optimization: we can put the result directly in the registers, or in
|
;; Optimization: we put the result directly in the registers, or in
|
||||||
;; the appropriate spot on the stack.
|
;; the appropriate spot on the stack. This takes into account the popenviroment
|
||||||
|
;; that happens right afterwards.
|
||||||
(cond [(eq? target 'val)
|
(cond [(eq? target 'val)
|
||||||
'val]
|
'val]
|
||||||
[(eq? target 'proc)
|
[(eq? target 'proc)
|
||||||
'proc]
|
'proc]
|
||||||
[(EnvLexicalReference? target)
|
[(EnvLexicalReference? target)
|
||||||
|
;; The optimization is right here.
|
||||||
(make-EnvLexicalReference (+ (EnvLexicalReference-depth target) n))])
|
(make-EnvLexicalReference (+ (EnvLexicalReference-depth target) n))])
|
||||||
(make-ApplyPrimitiveProcedure n))
|
(make-ApplyPrimitiveProcedure n))
|
||||||
,(make-PopEnvironment n 0))))
|
,(make-PopEnvironment n 0))))
|
||||||
|
|
||||||
|
|
||||||
after-call))))
|
after-call))))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user