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

Issue 12211112: Start work on a non-complete type inferrer. Currently only analyzes return types. (Closed)

Created:
7 years, 10 months ago by ngeoffray
Modified:
7 years, 10 months ago
Reviewers:
sra1, kasperl
CC:
reviews_dartlang.org, ahe, sra1
Visibility:
Public.

Description

Start work on a non-complete type inferrer. Currently only analyzes return types. Committed: https://code.google.com/p/dart/source/detail?r=18447

Patch Set 1 : #

Total comments: 35

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+932 lines, -74 lines) Patch
M sdk/lib/_internal/compiler/implementation/compiler.dart View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart View 1 2 3 4 5 1 chunk +5 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/js_number.dart View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/resolution/members.dart View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/builder.dart View 1 2 3 4 5 4 chunks +23 lines, -9 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/codegen.dart View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/nodes.dart View 1 2 3 4 5 2 chunks +5 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/optimize.dart View 1 2 3 4 5 6 chunks +18 lines, -11 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/types.dart View 1 2 3 4 5 1 chunk +16 lines, -6 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart View 1 2 3 4 5 2 chunks +8 lines, -5 lines 0 comments Download
A sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart View 1 2 3 4 5 1 chunk +781 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/types/types.dart View 1 2 3 4 5 4 chunks +26 lines, -13 lines 0 comments Download
M tests/compiler/dart2js/cpa_inference_test.dart View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M tests/compiler/dart2js/mock_compiler.dart View 1 2 3 4 5 1 chunk +19 lines, -17 lines 0 comments Download
A tests/language/return_this_type_test.dart View 1 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
ngeoffray
This is now ready for review. It currently only infers return types and does not ...
7 years, 10 months ago (2013-02-11 18:12:23 UTC) #1
sra1
Some nice wins. I patched this CL and saw that there were some uncalled bailouts. ...
7 years, 10 months ago (2013-02-12 03:20:27 UTC) #2
polux
Hello, if I understand correctly, this CL introduces a type inferrer akin to the one ...
7 years, 10 months ago (2013-02-12 08:39:49 UTC) #3
ngeoffray
Hi Paul, On 2013/02/12 08:39:49, polux wrote: > Hello, > > if I understand correctly, ...
7 years, 10 months ago (2013-02-12 09:02:32 UTC) #4
kasperl
LGTM with comments: https://codereview.chromium.org/12211112/diff/8001/sdk/lib/_internal/compiler/implementation/ssa/builder.dart File sdk/lib/_internal/compiler/implementation/ssa/builder.dart (right): https://codereview.chromium.org/12211112/diff/8001/sdk/lib/_internal/compiler/implementation/ssa/builder.dart#newcode3368 sdk/lib/_internal/compiler/implementation/ssa/builder.dart:3368: // TODO(ngeoffray): Only do this if ...
7 years, 10 months ago (2013-02-12 10:33:44 UTC) #5
ngeoffray
Thanks all for the comments @Stephen: thanks for catching the unnecessary bailouts. The problem was ...
7 years, 10 months ago (2013-02-12 11:58:22 UTC) #6
kasperl
7 years, 10 months ago (2013-02-12 12:21:19 UTC) #7
https://codereview.chromium.org/12211112/diff/8001/sdk/lib/_internal/compiler...
File sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart
(right):

https://codereview.chromium.org/12211112/diff/8001/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart:51: *
Maps a name to elements in the universe that have that name.
On 2013/02/12 11:58:22, ngeoffray wrote:
> On 2013/02/12 10:33:44, kasperl wrote:
> > Long term, you probably want to map selectors to the elements they can end
up
> > accessing? A FunctionSet should be a reasonable foundation for that.
> 
> Yes. About that: are you thinking along the lines of one FunctionSet per
> name/selector, or one FunctionSet for the entire program? One FunctionSet per
> name/selector seems very expensive.

I was thinking one big FunctionSet.

Powered by Google App Engine
This is Rietveld 408576698