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)

x86
macOS
defect
Not set
normal

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.
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.
Blocks: infer-regress
No longer blocks: TypeInference
Depends on: 619693
Blocks: 621126
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.