Closed
Bug 695017
Opened 15 years ago
Closed 15 years ago
IonMonkey: Null Increment error
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: nbp, Assigned: dvander)
References
Details
Attachments
(1 file, 1 obsolete file)
|
6.08 KB,
patch
|
cdleary
:
review+
|
Details | Diff | Splinter Review |
The test basic/testNullIncrement.js started to fail, after the implementation of Bug 691340. The test can be simplified to test without waiting for Bug 691340 fix:
function f() {
var n = null;
return n++;
}
print(f());
assertEq(f(), 0);
| Assignee | ||
Updated•15 years ago
|
| Assignee | ||
Comment 1•15 years ago
|
||
The bug here is that jsop_localinc/jsop_arginc do not ToNumber() their inputs.
Assignee: general → dvander
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•15 years ago
|
||
The bug is that localinc/arginc weren't performing a ToNumber conversion. It was implicit in the type policy for Add, which isn't really correct since it has to happen on the local, not the stack.
Attachment #570349 -
Flags: review?(cdleary)
| Assignee | ||
Comment 3•15 years ago
|
||
wrong patch
Attachment #570349 -
Attachment is obsolete: true
Attachment #570349 -
Flags: review?(cdleary)
Attachment #570351 -
Flags: review?(cdleary)
Comment 4•15 years ago
|
||
Comment on attachment 570351 [details] [diff] [review]
fix
Review of attachment 570351 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/ion/IonBuilder.cpp
@@ +1771,5 @@
> + bool post = !!(js_CodeSpec[op].format & JOF_POST);
> + TypeOracle::Binary types = oracle->binaryOp(script, pc);
> +
> + // Grab the value at the local slot, and convert it to a number. Currently,
> + // we use ToInt32 or ToNumber which are idempotent. This whole operation
Can we say, 'fallible, but idempotent'?
Attachment #570351 -
Flags: review?(cdleary) → review+
| Assignee | ||
Comment 5•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•