Partial fix for 653.

This commit is contained in:
Jeremy Ashkenas
2010-09-12 11:08:05 -04:00
parent e5837b4ee9
commit 3a20d7dacb
3 changed files with 31 additions and 9 deletions

View File

@@ -339,6 +339,8 @@ exports.ValueNode = class ValueNode extends BaseNode
# the value of the indexes.
cacheIndexes: (o) ->
copy = new ValueNode @base, @properties[0..]
if @base instanceof CallNode
[@base, copy.base] = @base.compileReference o
for prop, i in copy.properties
if prop instanceof IndexNode and prop.contains((n) -> n instanceof CallNode)
[index, indexVar] = prop.index.compileReference o