Closed
Bug 267216
Opened 20 years ago
Closed 20 years ago
Unary increment doesn't pass 'assigning' flag under JSCLASS_NEW_RESOLVE
Categories
(Core :: JavaScript Engine, defect, P2)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla1.8alpha5
People
(Reporter: mike+mozilla, Assigned: brendan)
Details
(Keywords: js1.5)
Attachments
(1 file)
|
1.07 KB,
patch
|
shaver
:
review+
|
Details | Diff | Splinter Review |
js engine from the tip:
js> it.noisy=true
true
js> it.foo = 1
resolving its property foo, flags {qualified,assigning,}
adding its property foo, initial value 1
setting its property foo, new value 1
1
js> it.bar++
resolving its property bar, flags {qualified,,}
getting its property bar, current value undefined
resolving its property bar, flags {qualified,,}
adding its property bar, initial value NaN
setting its property bar, new value NaN
NaN
... I expected to see 'assigning' in the resolve printf for 'it.bar++'. I used
this op to close named scopes to property creation (outside of 'var') for
Tellme... but unary ++ creates a hole!| Reporter | ||
Comment 1•20 years ago
|
||
From an email from Brendan:
> It's a bug -- can you file it at bugzilla.mozilla.org, Browser /
> JavaScript Engine, cc'ing me and shaver? Say something about "should
> set and clear JSFRAME_ASSIGNING around assigning parts of ++ and --
> bytecode cases in the interpreter." Thanks,
cc'ing shaver. (Hi, Mike!)| Assignee | ||
Comment 2•20 years ago
|
||
Patch now. /be
Status: NEW → ASSIGNED
Keywords: js1.5
OS: Windows XP → All
Priority: -- → P2
Hardware: PC → All
Target Milestone: --- → mozilla1.8alpha5
| Assignee | ||
Comment 3•20 years ago
|
||
With this patch:
js> it.noisy=true
true
js> it.foo=1
resolving its property foo, flags {qualified,assigning,}
adding its property foo, initial value 1
setting its property foo, new value 1
1
js> it.bar++
resolving its property bar, flags {qualified,,}
getting its property bar, current value undefined
resolving its property bar, flags {qualified,assigning,}
adding its property bar, initial value NaN
setting its property bar, new value NaN
NaN
js>
finalizing it
/be| Assignee | ||
Comment 4•20 years ago
|
||
Comment on attachment 164456 [details] [diff] [review] fix Simple, perhaps branch-worthy -- thoughts? /be
Attachment #164456 -
Flags: review?(shaver)
Updated•20 years ago
|
Attachment #164456 -
Flags: review+
| Assignee | ||
Updated•20 years ago
|
Attachment #164456 -
Flags: review?(shaver)
| Assignee | ||
Comment 5•20 years ago
|
||
Fixed on trunk. If anyone wants this on aviary and 1.7.x branches, speak fast. /be
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•