better instruction selection when the popenvironment doesn't have to skip any frames.

This commit is contained in:
Danny Yoo 2011-03-27 00:03:19 -04:00
parent a640cfe083
commit 2c887255d8

View File

@ -285,10 +285,12 @@ EOF
"undefined")))
", "))]
[(PopEnvironment? stmt)
(format "MACHINE.env.splice(MACHINE.env.length-(~a),~a);"
(+ (PopEnvironment-skip stmt)
(PopEnvironment-n stmt))
(PopEnvironment-n stmt))])))
(if (= (PopEnvironment-skip stmt) 0)
(format "MACHINE.env.length = MACHINE.env.length - ~a;" (PopEnvironment-n stmt))
(format "MACHINE.env.splice(MACHINE.env.length-(~a),~a);"
(+ (PopEnvironment-skip stmt)
(PopEnvironment-n stmt))
(PopEnvironment-n stmt)))])))