Last Comment Bug 671630 - Various cleanups to typed array initialization
: Various cleanups to typed array initialization
Status: RESOLVED FIXED
[inbound]
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla8
Assigned To: Jeff Walden [:Waldo] (remove +bmo to email)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-14 12:20 PDT by Jeff Walden [:Waldo] (remove +bmo to email)
Modified: 2011-08-05 08:55 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Replace INIT_TYPED_ARRAY_CLASS with a templatized method (8.29 KB, patch)
2011-07-14 12:22 PDT, Jeff Walden [:Waldo] (remove +bmo to email)
mrbkap: review+
Details | Diff | Review
Add a BYTES_PER_ELEMENT atom, needed for next patch (2.04 KB, patch)
2011-07-14 12:23 PDT, Jeff Walden [:Waldo] (remove +bmo to email)
mrbkap: review+
Details | Diff | Review
Make initialization more explicit about what it's doing, don't rely on a highly generalized initpath (6.65 KB, patch)
2011-07-14 12:24 PDT, Jeff Walden [:Waldo] (remove +bmo to email)
mrbkap: review+
Details | Diff | Review
Do the same for ArrayBuffer, to wrap everything up (2.25 KB, patch)
2011-07-14 12:26 PDT, Jeff Walden [:Waldo] (remove +bmo to email)
mrbkap: review+
Details | Diff | Review

Description Jeff Walden [:Waldo] (remove +bmo to email) 2011-07-14 12:20:09 PDT

    
Comment 1 Jeff Walden [:Waldo] (remove +bmo to email) 2011-07-14 12:22:21 PDT
Created attachment 545972 [details] [diff] [review]
Replace INIT_TYPED_ARRAY_CLASS with a templatized method
Comment 2 Jeff Walden [:Waldo] (remove +bmo to email) 2011-07-14 12:23:07 PDT
Created attachment 545973 [details] [diff] [review]
Add a BYTES_PER_ELEMENT atom, needed for next patch
Comment 3 Jeff Walden [:Waldo] (remove +bmo to email) 2011-07-14 12:24:45 PDT
Created attachment 545974 [details] [diff] [review]
Make initialization more explicit about what it's doing, don't rely on a highly generalized initpath
Comment 4 Jeff Walden [:Waldo] (remove +bmo to email) 2011-07-14 12:26:02 PDT
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.
Comment 5 Blake Kaplan (:mrbkap) (please use needinfo!) 2011-07-27 15:18:26 PDT
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.
Comment 6 Jeff Walden [:Waldo] (remove +bmo to email) 2011-08-03 12:55:32 PDT
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.  :-)
Comment 7 Marco Bonardo [::mak] 2011-08-04 03:15:11 PDT
http://hg.mozilla.org/mozilla-central/rev/42921f676fd8

leaving open per comment 6

Note You need to log in before you can comment on or make changes to this bug.