Permalink
Browse files

fixed a bug in which we were overeager in the CPS rotations.

  • Loading branch information...
1 parent b12f2f6 commit 07e0a35b62c2d583d785b3288c44d73b30943d52 @maxtaco committed Nov 22, 2011
Showing with 8 additions and 8 deletions.
  1. +3 −2 lib/coffee-script/nodes.js
  2. +5 −6 src/nodes.coffee

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -179,9 +179,8 @@ exports.Base = class Base
@tameNodeFlag
walkAstCps : (flood) ->
- flood = true if @isLoop()
- if @isAwait()
- flood = false
+ flood = true if @isLoop() and @tameNodeFlag
+ flood = false if @isAwait()
@cpsNodeFlag = flood
for child in @flattenChildren()
@cpsNodeFlag = true if child.walkAstCps(flood)
@@ -436,7 +435,7 @@ exports.Block = class Block extends Base
# Perform all steps of the Tame transform
tameTransform : ->
@walkAstTame()
- #@walkAstCps(false)
+ @walkAstCps(false)
@cpsRotate()
#### Literal
@@ -1371,8 +1370,8 @@ exports.Code = class Code extends Base
@tameNodeFlag = true if super()
false
- walkAstCps : (flood) ->
- @cpsNodeFlag = super(false)
+ walkAstCps : (flood) ->
+ @cpsNodeFlag = true if super(false)
false
#### Param

0 comments on commit 07e0a35

Please sign in to comment.