Closed
Bug 450274
Opened 16 years ago
Closed 15 years ago
TM: js1_5/extensions/regress-164697.js FAIL
Categories
(Core :: JavaScript Engine, defect, P3)
Tracking
()
VERIFIED
FIXED
mozilla1.9.1
People
(Reporter: bc, Assigned: crowderbt)
References
Details
(Keywords: verified1.9.1)
Attachments
(1 file, 1 obsolete file)
3.04 KB,
patch
|
brendan
:
review+
|
Details | Diff | Splinter Review |
([]).__proto__ == Array.prototype reason: Expected value 'true', Actual value 'false' ([]).__proto__ == Array.prototype reason: Expected value 'true', Actual value 'false' (new Array()).__proto__ == Array.prototype reason: Expected value 'true', Actual value 'false' tracemonkey: 20f1f3c72ae7 tip
Flags: in-testsuite+
Flags: in-litmus-
Assignee | ||
Comment 3•16 years ago
|
||
Yes, this is still occurring. I'm looking at it.
Updated•16 years ago
|
Assignee: general → crowder
Assignee | ||
Comment 4•16 years ago
|
||
Okay. Here's the problem. The interpreter optimizes property look-ups in jsinterp.cpp at the do_getprop_with_obj label, and for dense-arrays, we use the object's prototype for prop-lookups using the property cache. This means that when we lookup "__proto__" on [], we're actually looking for __proto__ on Array.prototype, and thus fail. Fixing this requires more checking inside a very hot path, for an already non-standard feature. Should we WONTFIX this?
Assignee | ||
Comment 5•16 years ago
|
||
sayrer: at the very least, I think we can safely drop the priority on this bug.
Comment 7•16 years ago
|
||
Suggest if we care that we add a JSOP_PROTO bytecode for this. We deprecate setting [].__proto__ so let's WONTFIX that part of the regression. Easy bug for someone who wants to add a new opcode. /be
Assignee | ||
Comment 8•16 years ago
|
||
We'll need JSOP_PROTO, JSOP_COUNT, etc., right?
Comment 9•16 years ago
|
||
No. See the __count__ bug which I WONTFIXed. We should not be shy about getting away from failed experiments such as writable __proto__ (apart from the specific use-case of making a "dict": var o = {__proto__:null, ...}) and __count__. So, just JSOP_PROTO. /be
Comment 10•16 years ago
|
||
Brian, any updates here?
Assignee | ||
Comment 11•16 years ago
|
||
No, this dropped way off my radar, and still doesn't really seem worth fixing, relative to other things. Has the priority been moved back up?
Comment 12•16 years ago
|
||
Attachment #353104 -
Flags: review?(brendan)
Comment 13•16 years ago
|
||
Comment on attachment 353104 [details] [diff] [review] stab obj is non-native (a dense array) so can't be passed to js_GetPropertyHelper. I have JSOP_PROTO as part of the fix for bug 469625, will attach soon. /be
Attachment #353104 -
Flags: review?(brendan) → review-
Assignee | ||
Comment 14•15 years ago
|
||
Like so...?
Attachment #353104 -
Attachment is obsolete: true
Attachment #359812 -
Flags: review?(brendan)
Comment 15•15 years ago
|
||
Comment on attachment 359812 [details] [diff] [review] deoptimize these cases >+ if (pn->pn_atom == cx->runtime->atomState.protoAtom || >+ pn->pn_atom == cx->runtime->atomState.countAtom || >+ pn->pn_atom == cx->runtime->atomState.parentAtom) { ... >+ } else if (pn2->pn_atom == cx->runtime->atomState.protoAtom || >+ pn2->pn_atom == cx->runtime->atomState.countAtom || >+ pn2->pn_atom == cx->runtime->atomState.parentAtom) { Nir: prefer proto/parent/count order used in jsobj.cpp. r=me with that picked, thanks! /be
Attachment #359812 -
Flags: review?(brendan) → review+
Assignee | ||
Comment 16•15 years ago
|
||
This patch rode along in bug 469625 (we should reopen it if that landing does not stick, I suppose)
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•