Closed Bug 1552026 Opened 6 years ago Closed 2 years ago

Stop using self-hosting for implied class constructors

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED DUPLICATE of bug 1690943

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).

Priority: -- → P2

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.

Priority: P2 → P3
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.