Reviewers: jochen (OOO until Sept),
Message:
Thanks for comments (mostly done expect one counter-argument).
https://codereview.chromium.org/366153002/diff/600001/include/v8.h
File include/v8.h (right):
https://codereview.chromium.org/366153002/diff/600001/include/v8.h#newcode968
include/v8.h:968: virtual unsigned GetSomeData(const char** src,
unsigned position) = 0;
On 2014/08/13 14:24:45, jochen (slow - soon OOO) wrote:
GetMoreData?
it's a bit odd to pass TWO_BYTE data around as char* btw
what's the meaning of position?
why is v8 creating the background thread, and not the embedder? maybe
StartStreamingScript should return some object that has a method
"StartOnThread()". the embedder then creates a thread and calls that
method on
that thread.
1) This API (the name GetSomeData and passing the position) was adopted
from SharedBuffer. But GetMoreData without position works too (the
embedder can keep track of where we are), so changed this to GetMoreData
without position.
2) It's not odd to pass raw data as char*. Note that V8 is responsible
of decoding it, and at this point it's just a byte stream. Other places
pass raw byte data (which is possibly UTF-16) as char* too, for example
the threaded HTML parser:
BackgroundHTMLParser::appendRawBytesFromParserThread
3) Moved the threading to Blink. This now returns a ScriptStreamingTask
which has a method Run(). (StartOnThread() would be implying that it
just launches something and returns, whereas Run() can really block and
wait for data.)
https://codereview.chromium.org/366153002/diff/600001/include/v8.h#newcode1137
include/v8.h:1137: V8_INLINE StreamedSource(ExternalSourceStream*
source_stream);
On 2014/08/13 14:24:45, jochen (slow - soon OOO) wrote:
explicit
Done.
https://codereview.chromium.org/366153002/diff/600001/include/v8.h#newcode1141
include/v8.h:1141: // caller. The CachedData object is alive as long as
the Source object is
On 2014/08/13 14:24:45, jochen (slow - soon OOO) wrote:
you mean StreamedSource object?
Done.
Description:
Add script streaming API - DRAFT - NOT FOR COMMITTING.
Blink will use this API to stream script data into V8 as the scripts
load. During loading, V8 can already parse the scripts. They will be then
compiled and executed when the loading is complete.
BUG=
Please review this at https://codereview.chromium.org/366153002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+610, -96 lines):
M BUILD.gn
M include/v8.h
M src/api.cc
A src/background-parsing-task.h
A src/background-parsing-task.cc
M src/compiler.h
M src/compiler.cc
M src/parser.h
M src/parser.cc
M src/preparser.h
M src/scanner-character-streams.h
M src/scanner-character-streams.cc
M test/cctest/test-parsing.cc
M tools/gyp/v8.gyp
--
--
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.