Closed
Bug 619333
Opened 15 years ago
Closed 15 years ago
TypeInference: inference failure when calling array methods on objects
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jandem, Unassigned)
References
Details
(Whiteboard: fixed-in-jaegermonkey)
---
var o = {};
[].pop.call(o);
var x = o.length;
---
Triggers:
[infer failure] Missing type at #1:00030 popped 0: int
The happens for at least push, pop, shift and unshift.
Comment 1•15 years ago
|
||
Good catch! The array methods in particular need stronger write barriers to establish a correspondence between the type handler and actual behavior. The handlers really only deal with array receiver types, while the methods themselves can handle any object.
Updated•15 years ago
|
Comment 2•15 years ago
|
||
This adds write barriers for the .length properties of non-array objects updated by array natives. This seemed to be the only thing the natives could update that was not already accounted for by the type handlers --- integral properties are represented the same way for all objects.
http://hg.mozilla.org/projects/jaegermonkey/rev/6b5c2cb89388
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: fixed-in-jaegermonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•