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

Issue 10668029: Associate partial source map with each code block in Universe.generatedCode. (Closed)

Created:
8 years, 6 months ago by podivilov
Modified:
8 years, 4 months ago
Reviewers:
ahe, floitsch
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Associate partial source map with each code block in Universe.generatedCode. That way we can create partial source maps for individual functions in codegen, and join them into a single map at the end. Currently partial source maps contain only begin and end positions of all functions. R=ahe@google.com Committed: https://code.google.com/p/dart/source/detail?r=9400

Patch Set 1 #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -86 lines) Patch
M lib/compiler/implementation/compiler.dart View 5 chunks +11 lines, -11 lines 0 comments Download
M lib/compiler/implementation/dart2js.dart View 1 chunk +0 lines, -1 line 5 comments Download
M lib/compiler/implementation/dart_backend/backend.dart View 1 chunk +1 line, -1 line 0 comments Download
M lib/compiler/implementation/emitter.dart View 15 chunks +34 lines, -44 lines 2 comments Download
M lib/compiler/implementation/source_map_builder.dart View 6 chunks +26 lines, -17 lines 0 comments Download
M lib/compiler/implementation/ssa/codegen.dart View 4 chunks +31 lines, -4 lines 2 comments Download
M lib/compiler/implementation/ssa/ssa.dart View 1 chunk +1 line, -0 lines 0 comments Download
M lib/compiler/implementation/universe.dart View 3 chunks +8 lines, -8 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
podivilov
8 years, 6 months ago (2012-06-25 18:05:21 UTC) #1
podivilov
Florian, could you please take a look?
8 years, 5 months ago (2012-07-02 14:30:21 UTC) #2
floitsch
LGTM. https://chromiumcodereview.appspot.com/10668029/diff/1/lib/compiler/implementation/emitter.dart File lib/compiler/implementation/emitter.dart (right): https://chromiumcodereview.appspot.com/10668029/diff/1/lib/compiler/implementation/emitter.dart#newcode1060 lib/compiler/implementation/emitter.dart:1060: typedef void DefineInstanceMember(String invocationName, DefineInstanceMemberFunction ? imho it ...
8 years, 5 months ago (2012-07-02 15:18:32 UTC) #3
podivilov
Thanks! https://chromiumcodereview.appspot.com/10668029/diff/1/lib/compiler/implementation/emitter.dart File lib/compiler/implementation/emitter.dart (right): https://chromiumcodereview.appspot.com/10668029/diff/1/lib/compiler/implementation/emitter.dart#newcode1060 lib/compiler/implementation/emitter.dart:1060: typedef void DefineInstanceMember(String invocationName, On 2012/07/02 15:18:32, floitsch ...
8 years, 5 months ago (2012-07-03 13:08:49 UTC) #4
ahe
https://chromiumcodereview.appspot.com/10668029/diff/1/lib/compiler/implementation/dart2js.dart File lib/compiler/implementation/dart2js.dart (left): https://chromiumcodereview.appspot.com/10668029/diff/1/lib/compiler/implementation/dart2js.dart#oldcode245 lib/compiler/implementation/dart2js.dart:245: code = '$code\n//@ sourceMappingURL=${relativize(out, sourceMapOut)}'; Doesn't this mean that ...
8 years, 4 months ago (2012-08-02 20:34:56 UTC) #5
podivilov
https://chromiumcodereview.appspot.com/10668029/diff/1/lib/compiler/implementation/dart2js.dart File lib/compiler/implementation/dart2js.dart (left): https://chromiumcodereview.appspot.com/10668029/diff/1/lib/compiler/implementation/dart2js.dart#oldcode245 lib/compiler/implementation/dart2js.dart:245: code = '$code\n//@ sourceMappingURL=${relativize(out, sourceMapOut)}'; On 2012/08/02 20:34:56, ahe ...
8 years, 4 months ago (2012-08-21 12:29:35 UTC) #6
ahe
https://chromiumcodereview.appspot.com/10668029/diff/1/lib/compiler/implementation/dart2js.dart File lib/compiler/implementation/dart2js.dart (left): https://chromiumcodereview.appspot.com/10668029/diff/1/lib/compiler/implementation/dart2js.dart#oldcode245 lib/compiler/implementation/dart2js.dart:245: code = '$code\n//@ sourceMappingURL=${relativize(out, sourceMapOut)}'; On 2012/08/21 12:29:35, podivilov ...
8 years, 4 months ago (2012-08-21 12:42:32 UTC) #7
podivilov
https://chromiumcodereview.appspot.com/10668029/diff/1/lib/compiler/implementation/dart2js.dart File lib/compiler/implementation/dart2js.dart (left): https://chromiumcodereview.appspot.com/10668029/diff/1/lib/compiler/implementation/dart2js.dart#oldcode245 lib/compiler/implementation/dart2js.dart:245: code = '$code\n//@ sourceMappingURL=${relativize(out, sourceMapOut)}'; On 2012/08/21 12:42:32, ahe ...
8 years, 4 months ago (2012-08-21 17:04:25 UTC) #8
ahe
8 years, 4 months ago (2012-08-22 09:39:43 UTC) #9
https://chromiumcodereview.appspot.com/10668029/diff/1/lib/compiler/implement...
File lib/compiler/implementation/dart2js.dart (left):

https://chromiumcodereview.appspot.com/10668029/diff/1/lib/compiler/implement...
lib/compiler/implementation/dart2js.dart:245: code = '$code\n//@
sourceMappingURL=${relativize(out, sourceMapOut)}';
On 2012/08/21 17:04:25, podivilov wrote:
> On 2012/08/21 12:42:32, ahe wrote:
> > On 2012/08/21 12:29:35, podivilov wrote:
> > > On 2012/08/02 20:34:56, ahe wrote:
> > > > Doesn't this mean that we ignore source maps?
> > > 
> > > I think dart2js shouldn't inject sourceMappingURL comment into compiled
> code.
> > > You may want to use X-SourceMap http header to link compiled code to
source
> > map.
> > > And it is easier to append new sourceMappingURL comment than fixing
existing
> > one
> > > in case the relative path changed or you want to use absolute paths for
> source
> > > maps on your server.
> > 
> > How do we enable source maps by default without having a special HTTP
server?
> 
> Should we enable them by default? One can easily append the comment as a
> deployment step if needed.

I think the default behavior should be to enable source maps by default. We can
later consider if there should be an option to not enable them.

Powered by Google App Engine
This is Rietveld 408576698