Closed Bug 554458 Opened 16 years ago Closed 10 years ago

[typedarray] implement calling valueOf on object assignment

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 985733
Tracking Status
blocking2.0 --- -
status2.0 --- wanted

People

(Reporter: vlad, Unassigned)

Details

See https://bugzilla.mozilla.org/show_bug.cgi?id=550351#c33 -- when an object is assigned to a typed array element, currently that just ends up as NaN/0. Instead of we should call valueOf.
Bleh.
Alright, so the way to do this is to run an imacro at recording time, that does the value conversion. It will terminate with pc still on the same SETELEM, but now with a primitive type. Look at the various binary ops (i.e. JSOP_ADD). They do just that.
blocking2.0: --- → ?
blocking2.0: ? → beta1+
blocking2.0: beta1+ → beta2+
blocking2.0: beta2+ → betaN+
Does this still need to be fixed?
I think it would be a 'nice to have', but I definitely don't have a high need for it, and I don't think webgl content will either. Technically, not having this would be a deviation from the combination of various specs (typed arrays, webidl, ES) due to how they define conversion rules, but I don't think it's crucial.
Assignee: vladimir → general
Sounds like it doesn't block then.
blocking2.0: betaN+ → -
status2.0: --- → wanted
Assignee: general → nobody
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.