| Age | Commit message (Collapse) | Author |
|
Basically, properties (as written in source code) are only
registered once EVER, instead of "also" on subclasses, which
was previously the case - we were literally copying over the
descriptors and then re-evaluating as though they were new.
That's the goal, but to make it happen, we had to redo how
default property values are initialized. Things no longer self-
prepare by making a "storage" for all their cached values with
null, or defaults, filled in - instead they create a new object
which inherits those defaults from their prototype. This object
respectively has the prototype of the superclass' prototype's
defaults, and so on. A nice effect is that validating defaults
against update.validate specs now happens during prototype
finalization, instead of every time any instance is instantiated.
We also had to do the same kind of inheritence shenanigans
with the full propertyDescriptors specs themselves.
The real-world performance boost for this is probably more
or less zero RIGHT NOW, because Thing subclassing is used
crazy sparingly (and there's still work to make it really nice).
But if [[Prototype]] chains don't really take memory, then
possibly this cleans up a lot of extremely similar objects
where every new Thing property multiplies memory usage
across all instances of that thing, regardless how few actually
set a value. Maybe! Who knows what V8 really optimizes,
but maybe!
|
|
critically necessary for literally any inheritence shenanigans
|
|
|
|
|
|
|
|
Fully integrated, all in one commit! Wow!
|
|
Not used in content yet.
|
|
|
|
Also report errors finalizing properly
|
|
|
|
|
|
|
|
This is some nonsense. Should be better integrated later on so as
to support general implicit property descriptor inheritance, but
this allows for Thing itself to describe properties that every
Thing instance should have, at least.
|
|
This commit really does two separate things:
* Move the definition for `propertyDescriptors` from that string
key into `Symbol.for('CacheableObject.propertyDescriptors')`
* Allow and support descriptors for key-based properties, by
iterating over Reflect.ownKeys() instead of Object.entries()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|