Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(574)

Issue 366153002: Add script streaming API (Closed)

Created:
6 years, 5 months ago by marja
Modified:
6 years, 3 months ago
CC:
Paweł Hajdan Jr., v8-dev
Project:
v8
Visibility:
Public.

Description

Add script streaming API. 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= R=jochen@chromium.org, rossberg@chromium.org, svenpanne@chromium.org, yangguo@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=23865

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : rebased #

Patch Set 4 : rebased #

Patch Set 5 : stream cleanup #

Patch Set 6 : rebased #

Patch Set 7 : rebased #

Patch Set 8 : Fixed related to the Blink side rewrite (PendingScript) #

Patch Set 9 : fix #

Patch Set 10 : fix #

Patch Set 11 : rebased #

Patch Set 12 : origin and cached data #

Patch Set 13 : add context #

Patch Set 14 : compilation api fixes #

Patch Set 15 : taskify + style #

Patch Set 16 : git cl format #

Patch Set 17 : no prints #

Patch Set 18 : hash seed, allow lazy #

Patch Set 19 : fixed stack limits; patch ad hoc eval scopes #

Patch Set 20 : compilation fixes #

Patch Set 21 : rebased #

Patch Set 22 : after-rebase fixes #

Patch Set 23 : Enhanced API: give V8 the whole data chunk at a time. #

Patch Set 24 : robustness... #

Patch Set 25 : . #

Patch Set 26 : off by one #

Patch Set 27 : fixed fix #

Patch Set 28 : oops #

Patch Set 29 : special chars fix #

Total comments: 6

Patch Set 30 : comments #

Patch Set 31 : move threading to blink #

Patch Set 32 : cleanup + the rest of hte code review (eisinger@) #

Patch Set 33 : rebased #

Patch Set 34 : fix: ast node IDs #

Patch Set 35 : rebased on top of r23302 #

Patch Set 36 : add histogram timer (for tracing9 #

Patch Set 37 : rebased (r23481) #

Patch Set 38 : fixing the rebase #

Patch Set 39 : more #

Patch Set 40 : comments #

Patch Set 41 : small api changes #

Patch Set 42 : comment fix again #

Patch Set 43 : rebased (r23515) #

Patch Set 44 : added tests + fixed compilation flags (!) #

Total comments: 21

Patch Set 45 : code review (svenpanne@), part 1 #

Patch Set 46 : rebased #

Patch Set 47 : code review (svenpanne) part 2 #

Patch Set 48 : . #

Patch Set 49 : memcpy #

Patch Set 50 : adding tests #

Patch Set 51 : non-trivial rebase + fix throwing parse errors #

Patch Set 52 : error handling fixed #

Patch Set 53 : implementing utf-8 handling; added tests #

Patch Set 54 : random enhancements #

Patch Set 55 : cleanup #

Total comments: 16

Patch Set 56 : code review (eisinger) #

Patch Set 57 : cleanup & better comments #

Total comments: 10

Patch Set 58 : code review moar (jochen@) #

Total comments: 5

Patch Set 59 : code review (rossberg@) #

Patch Set 60 : code review (rossberg@) #

Patch Set 61 : rebased #

Patch Set 62 : rebased again? #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1010 lines, -78 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 1 chunk +2 lines, -0 lines 0 comments Download
M include/v8.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 3 chunks +94 lines, -0 lines 0 comments Download
M src/api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 3 chunks +98 lines, -0 lines 0 comments Download
A src/background-parsing-task.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 1 chunk +67 lines, -0 lines 0 comments Download
A src/background-parsing-task.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 1 chunk +62 lines, -0 lines 0 comments Download
M src/compiler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 6 chunks +23 lines, -0 lines 0 comments Download
M src/compiler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 12 chunks +67 lines, -28 lines 0 comments Download
M src/parser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 4 chunks +9 lines, -7 lines 0 comments Download
M src/parser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 8 chunks +76 lines, -24 lines 0 comments Download
M src/scanner-character-streams.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 2 chunks +43 lines, -0 lines 0 comments Download
M src/scanner-character-streams.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 4 chunks +163 lines, -19 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 1 chunk +304 lines, -0 lines 0 comments Download
M tools/gyp/v8.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (2 generated)
jochen (gone - plz use gerrit)
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; ...
6 years, 4 months ago (2014-08-13 14:24:46 UTC) #1
marja
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 ...
6 years, 4 months ago (2014-08-14 11:29:22 UTC) #2
marja
marja@chromium.org changed reviewers: + svenpanne@chromium.org
6 years, 3 months ago (2014-08-29 13:10:51 UTC) #3
Sven Panne
https://codereview.chromium.org/366153002/diff/900001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/366153002/diff/900001/include/v8.h#newcode1111 include/v8.h:1111: virtual unsigned GetMoreData(const char** src) = 0; I think ...
6 years, 3 months ago (2014-09-01 09:07:46 UTC) #4
marja
Thanks for having a look! I gather that this looks generally reasonable (the only non-trivially ...
6 years, 3 months ago (2014-09-01 11:58:17 UTC) #5
jochen (gone - plz use gerrit)
https://codereview.chromium.org/366153002/diff/900001/test/cctest/test-api.cc File test/cctest/test-api.cc (right): https://codereview.chromium.org/366153002/diff/900001/test/cctest/test-api.cc#newcode23021 test/cctest/test-api.cc:23021: snprintf(copy, len + 1, "%s", chunks_[index_]); On 2014/09/01 11:58:17, ...
6 years, 3 months ago (2014-09-01 13:16:32 UTC) #6
marja
https://codereview.chromium.org/366153002/diff/900001/test/cctest/test-api.cc File test/cctest/test-api.cc (right): https://codereview.chromium.org/366153002/diff/900001/test/cctest/test-api.cc#newcode23021 test/cctest/test-api.cc:23021: snprintf(copy, len + 1, "%s", chunks_[index_]); Argh, this discussion ...
6 years, 3 months ago (2014-09-01 13:23:25 UTC) #7
marja
https://codereview.chromium.org/366153002/diff/900001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/366153002/diff/900001/include/v8.h#newcode1134 include/v8.h:1134: ~StreamedSource(); Meanwhile, things seem to progress in bleeding edge. ...
6 years, 3 months ago (2014-09-02 12:43:36 UTC) #8
marja
svenpanne, jochen, ptal. Okay, now this is ready for review for realz. There are even ...
6 years, 3 months ago (2014-09-04 13:45:00 UTC) #9
marja
On 2014/09/04 13:45:00, marja wrote: > svenpanne, jochen, ptal. > > Okay, now this is ...
6 years, 3 months ago (2014-09-04 14:03:15 UTC) #10
Sven Panne
API LGTM
6 years, 3 months ago (2014-09-05 08:07:43 UTC) #11
jochen (gone - plz use gerrit)
is there a way for the embedder to cancel parsing? https://codereview.chromium.org/366153002/diff/1120001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/366153002/diff/1120001/include/v8.h#newcode1102 ...
6 years, 3 months ago (2014-09-08 11:27:07 UTC) #12
marja
jochen: thanks for having a look! yangguo: jochen said you'd be a good person for ...
6 years, 3 months ago (2014-09-08 16:14:47 UTC) #14
marja
On 2014/09/08 11:27:07, jochen wrote: > is there a way for the embedder to cancel ...
6 years, 3 months ago (2014-09-08 16:15:47 UTC) #15
marja
> yangguo: jochen said you'd be a good person for reviewing the UTF-8 handling > ...
6 years, 3 months ago (2014-09-08 16:34:08 UTC) #16
jochen (gone - plz use gerrit)
lgtm https://codereview.chromium.org/366153002/diff/1160001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/366153002/diff/1160001/include/v8.h#newcode1096 include/v8.h:1096: class V8_EXPORT ExternalSourceStream { nit. no need to ...
6 years, 3 months ago (2014-09-09 08:06:21 UTC) #17
marja
Thanks for review! https://codereview.chromium.org/366153002/diff/1160001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/366153002/diff/1160001/include/v8.h#newcode1096 include/v8.h:1096: class V8_EXPORT ExternalSourceStream { On 2014/09/09 ...
6 years, 3 months ago (2014-09-09 11:46:30 UTC) #18
Yang
On 2014/09/09 11:46:30, marja wrote: > Thanks for review! > > https://codereview.chromium.org/366153002/diff/1160001/include/v8.h > File include/v8.h ...
6 years, 3 months ago (2014-09-09 14:42:20 UTC) #19
marja
rossberg, fyi, I'm adding the streaming parsing API here, in case you want to have ...
6 years, 3 months ago (2014-09-09 14:53:54 UTC) #20
rossberg
From a superficial look, LGTM. Just one comment https://codereview.chromium.org/366153002/diff/1180001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/366153002/diff/1180001/include/v8.h#newcode1129 include/v8.h:1129: enum ...
6 years, 3 months ago (2014-09-10 13:39:28 UTC) #22
Yang
https://codereview.chromium.org/366153002/diff/1180001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/366153002/diff/1180001/include/v8.h#newcode1129 include/v8.h:1129: enum Encoding { ONE_BYTE, TWO_BYTE, UTF8 }; On 2014/09/10 ...
6 years, 3 months ago (2014-09-10 13:48:58 UTC) #23
marja
(thanks for having a look; now only commenting on the encoding names, will fix the ...
6 years, 3 months ago (2014-09-10 13:53:09 UTC) #24
rossberg
On 2014/09/10 13:53:09, marja wrote: > On 2014/09/10 13:48:58, Yang wrote: > > On 2014/09/10 ...
6 years, 3 months ago (2014-09-10 14:19:27 UTC) #25
marja
https://codereview.chromium.org/366153002/diff/1180001/src/parser.h File src/parser.h (right): https://codereview.chromium.org/366153002/diff/1180001/src/parser.h#newcode672 src/parser.h:672: Scope** ad_hoc_eval_scope); On 2014/09/10 13:39:28, rossberg wrote: > Why ...
6 years, 3 months ago (2014-09-10 14:22:12 UTC) #26
marja
Committed patchset #62 (id:1260001) manually as 23865 (presubmit successful).
6 years, 3 months ago (2014-09-11 11:06:48 UTC) #27
marja
6 years, 3 months ago (2014-09-11 12:02:49 UTC) #28
Message was sent while issue was closed.
On 2014/09/11 11:06:48, marja wrote:
> Committed patchset #62 (id:1260001) manually as 23865 (presubmit successful).

FYI, I had to revert this; the special characters were too much for the Windows
compiler.

A reincarnated version is here: https://codereview.chromium.org/566553002/

Powered by Google App Engine
This is Rietveld 408576698