The default bug view has changed. See this FAQ.

Various cleanups to typed array initialization

RESOLVED FIXED in mozilla8

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Waldo, Assigned: Waldo)

Tracking

unspecified
mozilla8
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [inbound])

Attachments

(4 attachments)

Comment hidden (empty)
Created attachment 545972 [details] [diff] [review]
Replace INIT_TYPED_ARRAY_CLASS with a templatized method
Attachment #545972 - Flags: review?(mrbkap)
Created attachment 545973 [details] [diff] [review]
Add a BYTES_PER_ELEMENT atom, needed for next patch
Attachment #545973 - Flags: review?(mrbkap)
Created attachment 545974 [details] [diff] [review]
Make initialization more explicit about what it's doing, don't rely on a highly generalized initpath
Attachment #545974 - Flags: review?(mrbkap)
Created attachment 545976 [details] [diff] [review]
Do the same for ArrayBuffer, to wrap everything up

A nice benefit is that allocation of array buffer slots for ArrayBuffer.prototype now fits naturally into the initialization path, rather than being an afterthought.
Attachment #545976 - Flags: review?(mrbkap)
Comment on attachment 545972 [details] [diff] [review]
Replace INIT_TYPED_ARRAY_CLASS with a templatized method

Review of attachment 545972 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jstypedarray.cpp
@@ +1772,5 @@
> +{
> +    JSObject *proto = js_InitClass(cx, global, NULL,
> +                         &ArrayType::slowClasses[ArrayType::ACTUAL_TYPE],
> +                         ArrayType::class_constructor, 3,
> +                         ArrayType::jsprops,

These lines look misindented.
Attachment #545972 - Flags: review?(mrbkap) → review+

Updated

6 years ago
Attachment #545973 - Flags: review?(mrbkap) → review+

Updated

6 years ago
Attachment #545974 - Flags: review?(mrbkap) → review+

Updated

6 years ago
Attachment #545976 - Flags: review?(mrbkap) → review+
I dumped the BYTES_PER_ELEMENT patch into a batched-up push (easy enough because it's near-independent of the others here), but the rest of the patches are still waiting for the typed array storage changes to land.

http://hg.mozilla.org/integration/mozilla-inbound/rev/42921f676fd8

So *don't* close this assuming the single inbound-landing fixes this entire bug.  :-)
http://hg.mozilla.org/mozilla-central/rev/42921f676fd8

leaving open per comment 6
Target Milestone: --- → mozilla8
http://hg.mozilla.org/integration/mozilla-inbound/rev/64ca7770ab49
http://hg.mozilla.org/integration/mozilla-inbound/rev/1e291b76d689
http://hg.mozilla.org/integration/mozilla-inbound/rev/0079dfa0cd23
http://hg.mozilla.org/integration/mozilla-inbound/rev/81c341716ad9

Now this is fixed.  :-)
Whiteboard: [inbound]
http://hg.mozilla.org/mozilla-central/rev/64ca7770ab49
http://hg.mozilla.org/mozilla-central/rev/1e291b76d689
http://hg.mozilla.org/mozilla-central/rev/0079dfa0cd23
http://hg.mozilla.org/mozilla-central/rev/81c341716ad9
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.