mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-05 08:13:06 +08:00
- A named function-local class expression whose only reference to its own
name is a shorthand property (`static wrap() { return { Packed }; }`)
now gets its name binding. The self-reference check read the shorthand
name's property symbol, so the class lowered without the binding and the
property held a placeholder function instead of the class.
- A function-local class's prototype takes its name from the class
object's interned name instead of a registered copy. The registry kept
every such prototype alive until the process exited, so evaluating a
local class repeatedly kept each evaluation's prototype and the method
state it captures: a program that evaluates a local class 200,000 times
and prints each instance peaked at 121 MB, and now at 2 MB.
Reusing a freed object clears its name.