prepack
prepack copied to clipboard
Revisit "widened property" mechanism
I find the mechanism to define a widened property as a value a bit awkward. It has many special cases.
It leads to some tricky serialization issues when we try to special case its initialization by emitting assignments and ensuring that we omit the properties from the first initialization. It is at least suboptimal but also possibly technically incorrect in some cases since we have to be careful with using assignment instead of defineProperty.
I've found several bugs related to "widened property" already:
#1551 #1565 #1567
I wonder if we should revisit this design. It seems to me that maybe the value itself isn't what needs special casing but the property itself?
Found another one: #1574