On Mon, Aug 8, 2016 at 3:16 PM, Jack <jack.b.p...@gmail.com> wrote:
> Thanks for the tip with the out-of-bounds.
> Unofrtunately I can't just create object - I actually tried this first - my
> data is a bit more complicated than my simplification here and there is a
> lot of it, as well as a lot of nesting so generating an object for it each
> time becomes expensive (and it changes too often to really cache the object
> too).

Okay, I understand.  You could create an ObjectTemplate with a
NamedPropertyHandlerConfiguration and an
IndexedPropertyHandlerConfiguration.  Then you can intercept all
property and indexed accesses and create objects lazily without
creating a new ObjectTemplate for each property or index.

A naive, non-caching implementation would break object identity (i.e.,
`o.x === o.x` would no longer be true) but that is no different from
regular JS getters/setters.

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to