Stop using self-hosting for implied class constructors
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
People
(Reporter: jorendorff, Unassigned)
Details
Currently, a class without an explicit constructor
method is created by JSOP_CLASSCONSTRUCTOR
or JSOP_DERIVEDCONSTRUCTOR
by cloning a self-hosted constructor, unless the class contains fields. If the class has any fields, we "synthesize" a constructor, which basically just means it gets its own script.
Now that we can synthesize default constructors, there's no need for the self-hosting scheme. I'd be happy if we could get rid of it. It's one of the odder things in the engine, and I don't use those words lightly.
This could cause performance effects either way, but should have no observable correctness impact (once bug 1552022 is fixed).
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Comment 1•6 years ago
|
||
Less pressing because less likely to pan out—a memory-use regression of tens of bytes per class led to a ~10KB overall regression per content process, which was considered worth fixing (because Firefox chrome code uses classes). See bug 1553744.
Updated•2 years ago
|
Description
•