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

Issue 316173002: Handle "//# sourceURL" comments in the Parser instead of the JS. (Closed)

Created:
6 years, 6 months ago by marja
Modified:
6 years, 5 months ago
Reviewers:
Sven Panne, aandrey, yurys
CC:
v8-dev, ulan
Visibility:
Public.

Description

Handle "//# sourceURL" comments in the Parser instead of the JS. BUG=v8:2948 LOG=N R=svenpanne@chromium.org, yurys@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=22137

Patch Set 1 #

Total comments: 2

Patch Set 2 : oops #

Total comments: 4

Patch Set 3 : fix #

Patch Set 4 : moar fixes #

Patch Set 5 : sourceMappingURL too #

Patch Set 6 : moar tests #

Patch Set 7 : . #

Total comments: 9

Patch Set 8 : code review + less whitespaces allowed. #

Total comments: 3

Patch Set 9 : code review (yurys) #

Patch Set 10 : match ContentSearchUtils even more #

Total comments: 6

Patch Set 11 : rebased #

Patch Set 12 : Code review (svenpanne@) #

Total comments: 1

Patch Set 13 : rebased #

Patch Set 14 : less magic in names #

Total comments: 4

Patch Set 15 : test fix + code review (aandrey) #

Patch Set 16 : trivial rebase #

Patch Set 17 : rebased harder #

Patch Set 18 : yet another trivial rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+362 lines, -44 lines) Patch
M include/v8.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +9 lines, -0 lines 0 comments Download
M src/accessors.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M src/accessors.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +71 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 1 chunk +32 lines, -0 lines 0 comments Download
M src/bootstrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +18 lines, -1 line 0 comments Download
M src/heap.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M src/messages.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +5 lines, -33 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +9 lines, -1 line 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M src/parser.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M src/parser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +15 lines, -0 lines 0 comments Download
M src/scanner.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +18 lines, -5 lines 0 comments Download
M src/scanner.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +79 lines, -1 line 0 comments Download
M src/vector.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +11 lines, -0 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +82 lines, -0 lines 0 comments Download
M test/mjsunit/debug-compile-event.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +5 lines, -3 lines 0 comments Download

Messages

Total messages: 37 (0 generated)
yurys
https://codereview.chromium.org/316173002/diff/1/src/objects.h File src/objects.h (right): https://codereview.chromium.org/316173002/diff/1/src/objects.h#newcode6842 src/objects.h:6842: kEvalFrominstructionsOffsetOffset + kPointerSize; This should be kFlagsOffset + kPointerSize
6 years, 6 months ago (2014-06-05 13:13:38 UTC) #1
marja
https://codereview.chromium.org/316173002/diff/1/src/objects.h File src/objects.h (right): https://codereview.chromium.org/316173002/diff/1/src/objects.h#newcode6842 src/objects.h:6842: kEvalFrominstructionsOffsetOffset + kPointerSize; On 2014/06/05 13:13:39, yurys wrote: > ...
6 years, 6 months ago (2014-06-05 13:19:25 UTC) #2
yurys
https://codereview.chromium.org/316173002/diff/20001/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/316173002/diff/20001/src/parser.cc#newcode3853 src/parser.cc:3853: while (name_start < data.length() && data[name_start] == ' ') ...
6 years, 6 months ago (2014-06-05 13:55:20 UTC) #3
vsevik
> I believe we should consider only sourceURL that are at the end of file. ...
6 years, 6 months ago (2014-06-05 14:21:59 UTC) #4
marja
yurys@: the "has source url" bool is set to false in Scanner::Next(), so this only ...
6 years, 6 months ago (2014-06-05 15:28:03 UTC) #5
vsevik
On 2014/06/05 15:28:03, marja wrote: > yurys@: the "has source url" bool is set to ...
6 years, 6 months ago (2014-06-05 16:05:29 UTC) #6
marja
The latest patch set parses both sourceURL and sourceMappingURL, and allows them in the middle ...
6 years, 6 months ago (2014-06-06 11:15:35 UTC) #7
vsevik
> The latest patch set parses both sourceURL and sourceMappingURL, and allows them > in ...
6 years, 6 months ago (2014-06-06 14:03:23 UTC) #8
vsevik
FYI: Here is a blink side patch. It seems to pass all the tests. https://codereview.chromium.org/323523004/
6 years, 6 months ago (2014-06-06 17:14:45 UTC) #9
marja
On 2014/06/06 14:03:23, vsevik wrote: > Do you plan to remove the older javascript-based sourceURL ...
6 years, 6 months ago (2014-06-10 08:30:33 UTC) #10
yurys
https://codereview.chromium.org/316173002/diff/120001/src/accessors.cc File src/accessors.cc (right): https://codereview.chromium.org/316173002/diff/120001/src/accessors.cc#newcode601 src/accessors.cc:601: Object* source = Script::cast(JSValue::cast(object)->value())->source_url(); source -> url https://codereview.chromium.org/316173002/diff/120001/src/accessors.cc#newcode636 src/accessors.cc:636: ...
6 years, 6 months ago (2014-06-10 09:28:48 UTC) #11
vsevik
https://codereview.chromium.org/316173002/diff/120001/src/messages.js File src/messages.js (left): https://codereview.chromium.org/316173002/diff/120001/src/messages.js#oldcode561 src/messages.js:561: if (this.hasCachedNameOrSourceURL) { This should be done in a ...
6 years, 6 months ago (2014-06-10 11:49:30 UTC) #12
vsevik
> https://codereview.chromium.org/316173002/diff/120001/src/messages.js#oldcode561 > src/messages.js:561: if (this.hasCachedNameOrSourceURL) { > This should be done in a separate ...
6 years, 6 months ago (2014-06-10 11:50:23 UTC) #13
yurys
https://codereview.chromium.org/316173002/diff/120001/src/messages.js File src/messages.js (left): https://codereview.chromium.org/316173002/diff/120001/src/messages.js#oldcode561 src/messages.js:561: if (this.hasCachedNameOrSourceURL) { On 2014/06/10 11:49:29, vsevik wrote: > ...
6 years, 6 months ago (2014-06-10 11:55:28 UTC) #14
vsevik
> The result seems unchanged why the tests would break? Oh, I didn't get it, ...
6 years, 6 months ago (2014-06-10 12:14:58 UTC) #15
vsevik
> https://codereview.chromium.org/316173002/diff/120001/src/scanner.cc#newcode318 > src/scanner.cc:318: // Magic comments are of the form \s*name\s*=\s*value\s*.* > and this ...
6 years, 6 months ago (2014-06-10 12:26:12 UTC) #16
marja
On 2014/06/10 12:26:12, vsevik wrote: > > > https://codereview.chromium.org/316173002/diff/120001/src/scanner.cc#newcode318 > > src/scanner.cc:318: // Magic comments ...
6 years, 6 months ago (2014-06-10 13:45:54 UTC) #17
marja
& thanks for comments! https://codereview.chromium.org/316173002/diff/120001/src/accessors.cc File src/accessors.cc (right): https://codereview.chromium.org/316173002/diff/120001/src/accessors.cc#newcode601 src/accessors.cc:601: Object* source = Script::cast(JSValue::cast(object)->value())->source_url(); On ...
6 years, 6 months ago (2014-06-10 13:46:09 UTC) #18
yurys
https://codereview.chromium.org/316173002/diff/140001/include/v8.h File include/v8.h (right): https://codereview.chromium.org/316173002/diff/140001/include/v8.h#newcode949 include/v8.h:949: // Data read from magic sourceURL and sourceMappingURL comments. ...
6 years, 6 months ago (2014-06-10 14:41:04 UTC) #19
yurys
https://codereview.chromium.org/316173002/diff/140001/src/scanner.cc File src/scanner.cc (right): https://codereview.chromium.org/316173002/diff/140001/src/scanner.cc#newcode345 src/scanner.cc:345: while (c0_ >= 0 && !unicode_cache_->IsWhiteSpaceOrLineTerminator(c0_)) { On 2014/06/10 ...
6 years, 6 months ago (2014-06-10 14:46:54 UTC) #20
marja
Yeah okay, let's match the ContentSearchUtils.cpp. The latest patch set does that.
6 years, 6 months ago (2014-06-10 15:02:56 UTC) #21
yurys
On 2014/06/10 15:02:56, marja wrote: > Yeah okay, let's match the ContentSearchUtils.cpp. The latest patch ...
6 years, 6 months ago (2014-06-10 15:18:16 UTC) #22
marja
On 2014/06/10 15:18:16, yurys wrote: > On 2014/06/10 15:02:56, marja wrote: > > Yeah okay, ...
6 years, 6 months ago (2014-06-10 15:21:13 UTC) #23
marja
The latest patch set matches the disallowed characters and whitespace handling of ContentSearchUtils, even though ...
6 years, 6 months ago (2014-06-11 07:40:53 UTC) #24
yurys
LGTM On 2014/06/11 07:40:53, marja wrote: > The latest patch set matches the disallowed characters ...
6 years, 6 months ago (2014-06-11 11:32:18 UTC) #25
marja
svenpanne@, ulan@, could you do the V8 side review? svenpanne: API additions ulan: the rest
6 years, 6 months ago (2014-06-11 13:17:31 UTC) #26
Sven Panne
LGTM with nits. https://codereview.chromium.org/316173002/diff/170001/src/messages.js File src/messages.js (right): https://codereview.chromium.org/316173002/diff/170001/src/messages.js#newcode566 src/messages.js:566: $Array("source", "name", "source_url", "source_mapping_url", "line_ends", "line_offset", ...
6 years, 6 months ago (2014-06-13 10:37:50 UTC) #27
marja
Thanks for review! ulan@, since svenpanne@ reviewed everything, I'm not expecting you to review too ...
6 years, 6 months ago (2014-06-13 11:15:29 UTC) #28
marja
(V8 is not accepting commits atm, and I need to get my delay-string-internalization CL re-landed ...
6 years, 6 months ago (2014-06-18 14:01:51 UTC) #29
marja
Update: I rebased this on top of the string-internalization-delay changes, and changed the rest of ...
6 years, 5 months ago (2014-07-01 09:20:56 UTC) #30
marja
(Also, wanted to say that no action from anybody else than me is needed.)
6 years, 5 months ago (2014-07-01 09:21:15 UTC) #31
aandrey
FYI https://codereview.chromium.org/316173002/diff/250001/src/vector.h File src/vector.h (right): https://codereview.chromium.org/316173002/diff/250001/src/vector.h#newcode103 src/vector.h:103: bool operator==(const Vector<T>& other) { bool operator==() const ...
6 years, 5 months ago (2014-07-01 09:49:12 UTC) #32
marja
Btw, one thing turned out during the test run... Now that the parser takes care ...
6 years, 5 months ago (2014-07-01 11:33:58 UTC) #33
marja
> (Two vectors can point to the other same data. Wut, I meant to say: ...
6 years, 5 months ago (2014-07-01 11:52:24 UTC) #34
vsevik
> So the sourceURL is not available in the "before compile" debug event. > > ...
6 years, 5 months ago (2014-07-01 13:05:09 UTC) #35
marja
On 2014/07/01 13:05:09, vsevik wrote: > > So the sourceURL is not available in the ...
6 years, 5 months ago (2014-07-01 13:29:07 UTC) #36
marja
6 years, 5 months ago (2014-07-02 07:01:45 UTC) #37
Message was sent while issue was closed.
Committed patchset #18 manually as r22137 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698