Closed
Bug 402331
Opened 18 years ago
Closed 18 years ago
In a compiled iterator "this" points to an instance of RuntimeGeneratorState
Categories
(Rhino Graveyard :: Compiler, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.7R1
People
(Reporter: mozilla.bugs, Assigned: norrisboyd)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9
Build Identifier: CVS HEAD
The code below works in interpreted mode and fails in compiled mode.
a = [1,2];
a.__iterator__ = function() { yield [0, this[0]]; yield [1, this[1]]}
for(i in a) i;
It throws this exception:
org.mozilla.javascript.EvaluatorException:
Java class "org.mozilla.javascript.optimizer.OptRuntime$RuntimeGeneratorState" has no public instance field or method named "0".
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
| Assignee | ||
Updated•18 years ago
|
Assignee: nobody → norrisboyd
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Assignee | ||
Comment 2•18 years ago
|
||
Fixed:
Checking in Codegen.java;
/cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/optimizer/Codegen.java,v <-- Codegen.java
new revision: 1.260; previous revision: 1.259
done
Checking in OptRuntime.java;
/cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/optimizer/OptRuntime.java,v <-- OptRuntime.java
new revision: 1.38; previous revision: 1.37
done
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•