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

Issue 14049010: Take noSuchMethod into account when computing the potential targets of a call. (Closed)

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

Description

Take noSuchMethod into account when computing the potential targets of a call. Committed: https://code.google.com/p/dart/source/detail?r=21609

Patch Set 1 : #

Total comments: 1

Patch Set 2 : #

Total comments: 8

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+361 lines, -76 lines) Patch
M sdk/lib/_internal/compiler/implementation/compiler.dart View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/enqueue.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/backend.dart View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/optimize.dart View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart View 1 2 2 chunks +10 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/types/type_mask.dart View 1 2 1 chunk +121 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/universe/function_set.dart View 1 2 3 chunks +41 lines, -4 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/universe/universe.dart View 1 2 3 chunks +3 lines, -64 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/world.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/mock_compiler.dart View 1 2 3 chunks +3 lines, -0 lines 0 comments Download
A tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart View 1 2 1 chunk +134 lines, -0 lines 0 comments Download
A tests/language/no_such_method3_test.dart View 1 chunk +36 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
ngeoffray
https://codereview.chromium.org/14049010/diff/2001/sdk/lib/_internal/compiler/implementation/types/type_mask.dart File sdk/lib/_internal/compiler/implementation/types/type_mask.dart (right): https://codereview.chromium.org/14049010/diff/2001/sdk/lib/_internal/compiler/implementation/types/type_mask.dart#newcode392 sdk/lib/_internal/compiler/implementation/types/type_mask.dart:392: bool canHit(Element element, Selector selector, Compiler compiler) { This ...
7 years, 8 months ago (2013-04-15 15:30:33 UTC) #1
karlklose
LGTM. https://codereview.chromium.org/14049010/diff/6001/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart File sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart (right): https://codereview.chromium.org/14049010/diff/6001/sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart#newcode753 sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart:753: // A [noSuchMethod] method can be the target ...
7 years, 8 months ago (2013-04-16 13:54:47 UTC) #2
sra1
https://codereview.chromium.org/14049010/diff/6001/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart File sdk/lib/_internal/compiler/implementation/ssa/optimize.dart (right): https://codereview.chromium.org/14049010/diff/6001/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart#newcode340 sdk/lib/_internal/compiler/implementation/ssa/optimize.dart:340: && element.name != Compiler.NO_SUCH_METHOD) { What if I explicitly ...
7 years, 8 months ago (2013-04-16 18:57:19 UTC) #3
ngeoffray
7 years, 8 months ago (2013-04-17 09:11:18 UTC) #4
Thanks Karl and Stephen.

https://codereview.chromium.org/14049010/diff/6001/sdk/lib/_internal/compiler...
File sdk/lib/_internal/compiler/implementation/ssa/optimize.dart (right):

https://codereview.chromium.org/14049010/diff/6001/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/ssa/optimize.dart:340: && element.name
!= Compiler.NO_SUCH_METHOD) {
On 2013/04/16 18:57:19, sra1 wrote:
> What if I explicitly call noSuchMethod?

I changed the check. Explicitly calling noSuchMethod still goes into that branch
now.

https://codereview.chromium.org/14049010/diff/6001/sdk/lib/_internal/compiler...
File sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart
(right):

https://codereview.chromium.org/14049010/diff/6001/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart:753:
// A [noSuchMethod] method can be the target of any call, with
On 2013/04/16 13:54:47, karlklose wrote:
> 'with arbitrary number' -> 'with any number'?

Done.

https://codereview.chromium.org/14049010/diff/6001/tests/compiler/dart2js/sim...
File tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart (right):

https://codereview.chromium.org/14049010/diff/6001/tests/compiler/dart2js/sim...
tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart:79: 
On 2013/04/16 13:54:47, karlklose wrote:
> Extra line.

Done.

https://codereview.chromium.org/14049010/diff/6001/tests/compiler/dart2js/sim...
tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart:125:
checkReturn('test6', typesInferrer.numType.nullable());
On 2013/04/16 13:54:47, karlklose wrote:
> Add a comment to remove .nullable() when we can track aborting control flow?

Done.

Powered by Google App Engine
This is Rietveld 408576698