We currently use this trick for Date, RegExp and the debugger since it is relatively easy to intercept the first time someone tries to access them and many scripts don't use them at all. You could in principle do the same with strings or arrays but since almost all scripts use them it's better to just load them from the start and avoid the bookkeeping.
On Wed, Nov 19, 2008 at 6:36 PM, Pete Gontier <[EMAIL PROTECTED]> wrote: > I would be interested to know what else is loaded lazily like this. > > On Wed, Nov 19, 2008 at 1:42 AM, Christian Plesner Hansen > <[EMAIL PROTECTED]> wrote: >> >> Yes. In fact we use something like this to load the Date function >> lazily: not until the first time you access the Date property on the >> global object is the date library loaded. >> >> On Wed, Nov 19, 2008 at 10:11 AM, Anthony Shipman <[EMAIL PROTECTED]> >> wrote: >> > >> > Can I have the v8 engine call a C++ accessor function which then loads >> > and >> > compiles some javascript into the same context and executes it and then >> > returns the result back from the original call? >> > >> > -- >> > Anthony Shipman Mamas don't let your babies >> > [EMAIL PROTECTED] grow up to be outsourced. >> > >> > > >> > >> >> > > > > -- > Pete Gontier > http://pete.gontier.org/ > > > > --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list [email protected] http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---
