Will upload a new patch set tomorrow morning.
https://codereview.chromium.org/1140333003/diff/40001/include/v8.h
File include/v8.h (right):
https://codereview.chromium.org/1140333003/diff/40001/include/v8.h#newcode6379
include/v8.h:6379: MaybeLocal<Object> GetExtrasExportsObject();
On 2015/05/18 16:43:11, domenic wrote:
FYI I wasn't sure whether to use MaybeLocal or Local. MaybeLocal is
new and cool
but other methods of this class all return Locals.
You are right. At first I had a version where we could have undefined as
extras object, if there are no extra scripts, in which case we would
return an empty handle. Then I changed my mind, but forgot this part. I
will change this and update the comment.
https://codereview.chromium.org/1140333003/diff/40001/src/bootstrapper.cc
File src/bootstrapper.cc (right):
https://codereview.chromium.org/1140333003/diff/40001/src/bootstrapper.cc#newcode1472
src/bootstrapper.cc:1472: return CompileNative(isolate, name,
source_code, arraysize(args), args);
On 2015/05/18 17:41:39, domenic wrote:
I think removing the access to the buildin_exports_object prevents
extras code
from using InternalPackedArray.
This is correct and intentional. I want to have
- a "shared" container for all normal natives that are included in the
snapshot. After running the internal scripts, this container will be
thrown away.
- a "builtin exports" container to export and keep stuff required for
experimental natives, since those are not part of the snapshot, and need
to stay alive after creating the snapshot.
- a "extras exports" container for sharing things between C++ and JS for
extra scripts
- an "api exports" container to export things from normal natives to
extra natives, for example InternalPackedArrays.
The latter is not implemented yet, and I'm not entirely sure whether
extra exports and api exports should be the same object. It would be
simpler if they are, but the api exports can die after the extra scripts
have been executed, where as the extra exports need to stay alive for
its purpose.
https://codereview.chromium.org/1140333003/diff/40001/src/bootstrapper.cc#newcode1930
src/bootstrapper.cc:1930: JSObject::NormalizeProperties(builtin_exports,
CLEAR_INOBJECT_PROPERTIES, 2,
On 2015/05/18 16:43:11, domenic wrote:
copypasta: builtin_exports should be extras_exports
Yup. Thanks for catching this. Will fix.
https://codereview.chromium.org/1140333003/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.