DebugOnly makes binding to other languages (e.g. Rust) more complicated than needed.
--HG--
extra : rebase_source : 83d58042f9ef74a3e02c17b6de51144b721f113e
js::Class op are often all null. And when they're not all null, they're often
duplicated among classes. By pulling them out into their own struct, and using a
(possibly null) pointer in js::Class, we can save 114 KiB per process on
64-bit, and half that on 32-bit.
* * *
imported patch separate-ClassOps-2
--HG--
extra : rebase_source : bd751bf247e9491c1966a123dbeffa573657dfb1
|oOps| is short for "objectOps", which will contrast with the |cOps| "classOps"
field that the next patch will introduce.
--HG--
extra : rebase_source : 920662674e1f672d923cb9060de23c85dfc903bf
js::ClassExtension is often all null. When it's not all null, it's often
duplicated among classes. By pulling it out into its own struct, and using a
(possibly null) pointer in js::Class, we can save 17 KiB per process on
64-bit, and half that on 32-bit.
--HG--
extra : rebase_source : eb78ade09ce268e886d091f6cbc38d7e5e912527
Exceptions:
- AutoSetNewObjectMetadata and its related type are still exclusively about objects.
- JSCompartment::objectMetadataTable is still only about objects.
- the ObjectMetadataMap type still only has objects as keys.
Non-exceptions:
The builder type, and the JSCompartment member:
ObjectMetadataCallback -> AllocationMetadataBuilder
objectMetadataCallback -> allocationMetadataBuilder
jsfriendapi.h interface:
SetObjectMetadataCallback -> SetAllocationMetadataBuilder
GetObjectMetadata -> GetAllocationMetadata
JSCompartment methods:
hasObjectMetadataCallback -> hasAllocationMetadataBuilder
getObjectMetadataCallback -> getAllocationMetadataBuilder
setObjectMetadataCallback -> setAllocationMetadataBuilder
forgetObjectMetadataCallback -> forgetAllocationMetadataBuilder
addressOfMetadataCallback -> addressOfMetadataBuilder
Shell and testing functions:
SavedStacksMetadataCallback -> SavedStacksMetadataBuilder
ShellObjectMetadataCallback -> ShellAllocationMetadataBuilder
EnableShellObjectMetadataCallback -> EnableShellAllocationMetadataBuilder
enableShellObjectMetadataCallback -> enableShellAllocationMetadataBuilder
GetObjectMetadata -> GetAllocationMetadata
getObjectMetadata -> getAllocationMetadata
Delayed metadata collection:
shouldDelayMetadataCallback -> shouldDelayMetadataBuilder
JSCLASS_DELAY_METADATA_CALLBACK -> JSCLASS_DELAY_METADATA_BUILDER
suppressObjectMetadataCallback -> suppressAllocationMetadataBuilder
--HG--
extra : rebase_source : 54af5a56edd9b39466fa418f7a72fc586d0482d3
js::ClassSpec is often all null. When it's not all null, it's often duplicated
among classes. By pulling it out into its own struct, and using a (possibly
null) pointer in js::Class, we can save 138 KiB per process on 64-bit, and half
that on 32-bit.
--HG--
extra : rebase_source : 852ac6770ace46958d018107e78c5c44ebd6528a
js::ObjectOps is often all null. When it's not all null, it's often duplicated
many times among classes. By pulling it out into its own struct, and using a
(possibly null) pointer in js::Class, we can save 208 KiB per process on
64-bit, and half that on 32-bit.
--HG--
extra : rebase_source : 5be8fe45f652392571b8a6d7b63777cbafba6ae4