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

Issue 1284843002: dart2js: add simple script to compute dependency queries. Currently only (Closed)

Created:
5 years, 4 months ago by Siggi Cherem (dart-lang)
Modified:
5 years, 4 months ago
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

dart2js: add simple script to compute dependency queries. Currently only one query is supported "some_path", which gives you a way to determine how a function is included in the program. For example, running: dart code_deps.dart angular2_hello.js.info.json some_path main Compiler would produce this output: source: examples.src.hello_world.index...main target: angular2.src.core.compiler.compiler...Compiler.Compiler result: 0. examples.src.hello_world.index...main 1. examples.src.gestures.index.ng_deps.dart...initReflector 2. angular2.bootstrap_static.ng_deps.dart...initReflector 3. angular2.application_static.ng_deps.dart...initReflector 4. angular2.src.core.application_common.ng_deps.dart...initReflector 5. angular2.src.core.compiler.compiler.ng_deps.dart...initReflector 6. angular2.src.core.compiler.compiler...Compiler.Compiler The tool accepts regular expressions to match the name of the elements. The graph and util library will be used for other scripts as well. R=het@google.com Committed: https://github.com/dart-lang/sdk/commit/f95dd37d1a4845359c0df3d6820d8299619783d4

Patch Set 1 : #

Patch Set 2 : #

Total comments: 14

Patch Set 3 : #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+493 lines, -0 lines) Patch
A pkg/compiler/tool/code_deps.dart View 1 2 1 chunk +105 lines, -0 lines 0 comments Download
A pkg/compiler/tool/graph.dart View 1 2 1 chunk +292 lines, -0 lines 6 comments Download
A pkg/compiler/tool/util.dart View 1 2 1 chunk +96 lines, -0 lines 2 comments Download

Messages

Total messages: 11 (4 generated)
Siggi Cherem (dart-lang)
5 years, 4 months ago (2015-08-11 01:34:51 UTC) #3
Siggi Cherem (dart-lang)
(this one is now updated with all the other changes, but also includes small changes ...
5 years, 4 months ago (2015-08-11 21:57:00 UTC) #5
Harry Terkelsen
lgtm https://codereview.chromium.org/1284843002/diff/60001/pkg/compiler/tool/code_deps.dart File pkg/compiler/tool/code_deps.dart (right): https://codereview.chromium.org/1284843002/diff/60001/pkg/compiler/tool/code_deps.dart#newcode5 pkg/compiler/tool/code_deps.dart:5: /// Command-line tool to query for code dependncies. ...
5 years, 4 months ago (2015-08-11 22:57:43 UTC) #6
Siggi Cherem (dart-lang)
thanks Harry! https://codereview.chromium.org/1284843002/diff/60001/pkg/compiler/tool/code_deps.dart File pkg/compiler/tool/code_deps.dart (right): https://codereview.chromium.org/1284843002/diff/60001/pkg/compiler/tool/code_deps.dart#newcode5 pkg/compiler/tool/code_deps.dart:5: /// Command-line tool to query for code ...
5 years, 4 months ago (2015-08-12 00:06:01 UTC) #8
Siggi Cherem (dart-lang)
Committed patchset #3 (id:100001) manually as f95dd37d1a4845359c0df3d6820d8299619783d4 (presubmit successful).
5 years, 4 months ago (2015-08-12 00:12:50 UTC) #9
Johnni Winther
lgtm https://codereview.chromium.org/1284843002/diff/100001/pkg/compiler/tool/graph.dart File pkg/compiler/tool/graph.dart (right): https://codereview.chromium.org/1284843002/diff/100001/pkg/compiler/tool/graph.dart#newcode57 pkg/compiler/tool/graph.dart:57: /// node is not part of this graph, ...
5 years, 4 months ago (2015-08-18 13:17:11 UTC) #10
Siggi Cherem (dart-lang)
5 years, 4 months ago (2015-08-18 19:13:18 UTC) #11
Message was sent while issue was closed.
Thanks Johnni, I submitted a separate change with the fixes.

Here:
https://github.com/dart-lang/dart2js_info/commit/f952bbd8ff334c1446c70781aee1...

and here:
https://github.com/dart-lang/dart2js_info/commit/bfb46714c5a292f0c43e1164cd69...

https://codereview.chromium.org/1284843002/diff/100001/pkg/compiler/tool/grap...
File pkg/compiler/tool/graph.dart (right):

https://codereview.chromium.org/1284843002/diff/100001/pkg/compiler/tool/grap...
pkg/compiler/tool/graph.dart:57: /// node is not part of this graph, then a list
containing only the node
On 2015/08/18 13:17:11, Johnni Winther wrote:
> Shouldn't it be `is not a part of a cycle in this graph` ?

Good point yes

https://codereview.chromium.org/1284843002/diff/100001/pkg/compiler/tool/grap...
pkg/compiler/tool/graph.dart:65: Graph<N> dominatorTree(N root) {
On 2015/08/18 13:17:11, Johnni Winther wrote:
> Add documentation.

Done.

https://codereview.chromium.org/1284843002/diff/100001/pkg/compiler/tool/grap...
pkg/compiler/tool/graph.dart:171: _SccFinder(this._graph) : super();
On 2015/08/18 13:17:11, Johnni Winther wrote:
> Why the explicit super call?

removed, good catch!

(Except for the dominance code, the rest of this code and comments were
copied/adapted from an internal copy in package:analyzer, which was
autogenerated from Java. I tried to clean up some things, but I missed a couple
cases like this one :))

https://codereview.chromium.org/1284843002/diff/100001/pkg/compiler/tool/util...
File pkg/compiler/tool/util.dart (right):

https://codereview.chromium.org/1284843002/diff/100001/pkg/compiler/tool/util...
pkg/compiler/tool/util.dart:8: // Note: currently we build two graphs to debug
the differences between to
On 2015/08/18 13:17:11, Johnni Winther wrote:
> 'between to' -> 'between two' ?

Done.

Powered by Google App Engine
This is Rietveld 408576698