Closed
Bug 1021790
Opened 9 years ago
Closed 9 years ago
Cleanup naming for scalar and typed array types
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: bhackett1024, Assigned: bhackett1024)
References
Details
Attachments
(1 file)
181.73 KB,
patch
|
sfink
:
review+
|
Details | Diff | Splinter Review |
There are currently two separate enums, ArrayBufferView::ViewType in jsfriendapi.h and ScalarTypeDescr::Type in TypedObject.h, which encode almost (but not quite) the same set of values for the various primitive scalar types like uint8, float32, and so forth. There is no real consistency to how these enums are used in the engine, so we end up with cases where the enums are cast into each other, cast into and then back out of ints, mixed uses of the two enums within the same file, and so forth. This is a mess. The attached patch changes things so that there is a single new enum, Scalar::Type in jsfriendapi.h, which is used throughout the engine and by API clients. I tried to be economical with the naming (e.g. Scalar::Int32 instead of ArrayBufferView::TYPE_INT32) and also removed all the casts of this enum into or out of primitive types which I could.
Attachment #8435881 -
Flags: review?(sphink)
Comment 1•9 years ago
|
||
mcMerge absolutely refuses to comment to this bug. Landed https://hg.mozilla.org/integration/mozilla-inbound/rev/4d482d201608
Assignee | ||
Comment 2•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/4d482d201608
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
Attachment #8435881 -
Flags: review?(sphink) → review+
Updated•9 years ago
|
Assignee: nobody → bhackett1024
Target Milestone: --- → mozilla33
You need to log in
before you can comment on or make changes to this bug.
Description
•