Changeset 45904 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jul 15, 2009, 5:16:38 AM (16 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r45903 r45904 1 2009-07-15 Oliver Hunt <[email protected]> 2 3 Reviewed by Simon Hausmann. 4 5 REGRESSION: fast/js/postfix-syntax.html fails with interpreter 6 https://bugs.webkit.org/show_bug.cgi?id=27294 7 8 When postfix operators operating on locals assign to the same local 9 the order of operations has to be to store the incremented value, then 10 store the unmodified number. Rather than implementing this subtle 11 semantic in the interpreter I've just made the logic explicit in the 12 bytecode generator, so x=x++ effectively becomes x=ToNumber(x) (for a 13 local var x). 14 15 * parser/Nodes.cpp: 16 (JSC::emitPostIncOrDec): 17 1 18 2009-07-15 Oliver Hunt <[email protected]> 2 19 -
trunk/JavaScriptCore/parser/Nodes.cpp
r45609 r45904 496 496 static RegisterID* emitPostIncOrDec(BytecodeGenerator& generator, RegisterID* dst, RegisterID* srcDst, Operator oper) 497 497 { 498 if (srcDst == dst) 499 return generator.emitToJSNumber(dst, srcDst); 498 500 return (oper == OpPlusPlus) ? generator.emitPostInc(dst, srcDst) : generator.emitPostDec(dst, srcDst); 499 501 }
Note:
See TracChangeset
for help on using the changeset viewer.