Reviewers: jochen,
https://codereview.chromium.org/293993021/diff/1/include/v8.h
File include/v8.h (right):
https://codereview.chromium.org/293993021/diff/1/include/v8.h#newcode4668
include/v8.h:4668: #ifdef V8_USE_EXTERNAL_STARTUP_DATA
On 2014/05/23 11:44:44, jochen wrote:
embedders won't see this #define, the api should always be present
Done.
https://codereview.chromium.org/293993021/diff/1/src/api.cc
File src/api.cc (right):
https://codereview.chromium.org/293993021/diff/1/src/api.cc#newcode350
src/api.cc:350: #ifdef V8_USE_EXTERNAL_STARTUP_DATA
On 2014/05/23 11:44:44, jochen wrote:
only #ifdef the function body (and maybe add an CHECK(false) in the
#else part
Done.
https://codereview.chromium.org/293993021/diff/1/src/d8.cc
File src/d8.cc (right):
https://codereview.chromium.org/293993021/diff/1/src/d8.cc#newcode1320
src/d8.cc:1320: else if (strncmp(argv[i], "--natives_blob=", 15) == 0) {
On 2014/05/23 11:44:44, jochen wrote:
using - is more consistent with the other options (as opposed to _)
Done.
https://codereview.chromium.org/293993021/diff/1/src/d8.cc#newcode1528
src/d8.cc:1528: };
On 2014/05/23 11:44:44, jochen wrote:
nit. DISALLOW_COPY_AND_ASSIGN
d8.cc seems to avoid including internal v8 headers, so I implemented
this without the macro from src/macros.h. Not sure if that's the best
way to do it?
https://codereview.chromium.org/293993021/diff/1/src/mksnapshot.cc
File src/mksnapshot.cc (right):
https://codereview.chromium.org/293993021/diff/1/src/mksnapshot.cc#newcode316
src/mksnapshot.cc:316: void SetSnapshotFromFile(StartupData* data) {
ASSERT(false); }
On 2014/05/23 11:44:44, jochen wrote:
i guess this should go into snapshot-empty.cc?
Done.
Actually, to snapshot-common.cc, since that always gets used when
snapshot-external doesn't.
https://codereview.chromium.org/293993021/diff/1/src/snapshot-source-sink.h
File src/snapshot-source-sink.h (right):
https://codereview.chromium.org/293993021/diff/1/src/snapshot-source-sink.h#newcode22
src/snapshot-source-sink.h:22: SnapshotByteSource(const byte* array, int
length);
On 2014/05/23 11:44:44, jochen wrote:
please add a dtor
Done.
https://codereview.chromium.org/293993021/diff/1/src/snapshot-source-sink.h#newcode60
src/snapshot-source-sink.h:60: };
On 2014/05/23 11:44:44, jochen wrote:
disallow copy and assign
Done.
https://codereview.chromium.org/293993021/diff/1/tools/gyp/v8.gyp
File tools/gyp/v8.gyp (right):
https://codereview.chromium.org/293993021/diff/1/tools/gyp/v8.gyp#newcode624
tools/gyp/v8.gyp:624: '../../src/snapshot-source-sink.cc',
On 2014/05/23 11:44:44, jochen wrote:
can you do those changes (adding/removing files) in BUILD.gn as well?
It doesn't
have the snapshot generation logic or anything beyond that yet, so
just adding
the files to the list will be enough.
Done.
https://codereview.chromium.org/293993021/diff/1/tools/gyp/v8.gyp#newcode1136
tools/gyp/v8.gyp:1136: '<(SHARED_INTERMEDIATE_DIR)/libraries.bin',
On 2014/05/23 11:44:44, jochen wrote:
I think we want those in <(PRODUCT_DIR)
Done, but only for those two files that are meant to be used outside the
v8 build process, snapshot_blob.bin and natives_blob.bin. libraries.bin
(which is an input to natives_blob.bin) remains in
SHARED_INTERMEDIATE_DIR.
https://codereview.chromium.org/293993021/diff/1/tools/gyp/v8.gyp#newcode1143
tools/gyp/v8.gyp:1143: 'bash',
On 2014/05/23 11:44:44, jochen wrote:
there's no bash on windows. gyp has some magic to replace cat with
type on
windows, however, i'm not sure whether that can cope with binary
files, so you
may want to write a small python script for that.
Hmm... I got the idea from code search:
https://code.google.com/p/chromium/codesearch#search/&q=bash%20file:%5C.gyp$&sq=package:chromium&type=cs
Are you sure a separate script is needed?
Description:
Support external startup data in V8.
If the embedder chooses, the 'natives' (library sources) and the
precompiled startup blob can be written to files during the build
process and handed over to V8 at startup. The main purpose would be
to reduce the size of the compiled binary for space constrained
platforms.
The build-time option is off by default. Nothing should change if
it's not enabled.
BUG=
Please review this at https://codereview.chromium.org/293993021/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+983, -233 lines):
M BUILD.gn
M build/features.gypi
M include/v8.h
M src/api.cc
M src/d8.h
M src/d8.cc
M src/flag-definitions.h
M src/mksnapshot.cc
M src/natives.h
A src/natives-external.cc
M src/serialize.h
M src/serialize.cc
M src/snapshot.h
M src/snapshot-common.cc
A src/snapshot-external.cc
A src/snapshot-source-sink.h
A src/snapshot-source-sink.cc
M test/cctest/test-serialize.cc
M tools/gyp/v8.gyp
M tools/js2c.py
--
--
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.