Script::New
The existing interface for compiling strings as javascript code,
Script::Compile, produces context-specific scripts objects. This
means that you have to recompile a string for every context where you
want to run it. The new interface, Script::New, produces
context-independent script objects that can be run in any number of
contexts. If you run the same code in many different contexts over
the lifetime of your program then you can improve performance by using
this new api to avoid recompilation -- though how big a performance
improvement you'll see of course depends on your application.
TryCatch::StackTrace
This function returns the stack trace for the exception caught by the
TryCatch. The stack trace is taken from the .stack property of the
thrown object which all built-in errors have and which can be added to
custom error objects using the Error.captureStackTrace function.
Debug::GetMirror
The v8 debugger allows objects to be inspected using the concept of
"mirrors". Mirrors can be used to give a list of all properties of an
object (both enumerable and non-enumerable), to tell the attributes of
properties (DontEnum, ReadOnly, etc.) as well as lots of other
information. The Debug::GetMirror function, which returns the mirror
for a given value, gives users of the v8 api access to this
functionality. The best reference for the mirror api is currently the
implementation, mirror-delay.js.
These functions are currently only available in the bleeding_edge
branch of v8. I will follow up when they become available in the
trunk version.
-- Christian
Hiya!
A few new API functions have just been added to the v8 api. They are:
I'd like us to make more of an effort to announce interesting changes
on the mailing list as well and I expect we will be doing that.
Another place to get this information which may not be well known is
the ChangeLog file on trunk,
http://code.google.com/p/v8/source/browse/trunk/ChangeLog. It
contains a high-level description of all changes that may be relevant
to users or embedders and is updated for every new version of the
trunk.