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

Issue 11863007: Fix optional arguments handling. Handling of default values is for a further (Closed)

Created:
7 years, 11 months ago by polux
Modified:
7 years, 11 months ago
Reviewers:
karlklose
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix optional arguments handling. Handling of default values is for a further CL: this CL only aims at catching up with the changes in the spec. Committed: https://code.google.com/p/dart/source/detail?r=17189

Patch Set 1 #

Total comments: 5

Patch Set 2 : Address Karl's comments #

Patch Set 3 : sync to head #

Unified diffs Side-by-side diffs Delta from patch set Stats (+205 lines, -49 lines) Patch
M sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart View 1 chunk +63 lines, -44 lines 0 comments Download
M tests/compiler/dart2js/cpa_inference_test.dart View 1 2 2 chunks +142 lines, -5 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
polux
7 years, 11 months ago (2013-01-11 11:35:26 UTC) #1
karlklose
LGTM, but I think we could get rid of duplicated signature checks by using Selector.applies. ...
7 years, 11 months ago (2013-01-15 09:54:51 UTC) #2
polux
7 years, 11 months ago (2013-01-17 09:14:27 UTC) #3
https://chromiumcodereview.appspot.com/11863007/diff/1/sdk/lib/_internal/comp...
File
sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart
(right):

https://chromiumcodereview.appspot.com/11863007/diff/1/sdk/lib/_internal/comp...
sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart:679:
// guard 1: too many arguments
On 2013/01/15 09:54:51, karlklose wrote:
> Could we use selectors for these checks?

We could (and should) use selectors there. However, unless I missed something in
the way you obtain a selector, that seems like a pretty big change. I.e. it
looks to me you can get a selector out of a Node, but not a FunctionElement but
the code of the inferrer is passing around FunctionElements everywhere, not
nodes.

So unless I'm mistaken, I propose we submit this CL as is and we migrate to
selectors in a separate CL.

https://chromiumcodereview.appspot.com/11863007/diff/1/tests/compiler/dart2js...
File tests/compiler/dart2js/cpa_inference_test.dart (right):

https://chromiumcodereview.appspot.com/11863007/diff/1/tests/compiler/dart2js...
tests/compiler/dart2js/cpa_inference_test.dart:514:
testOptionalNamedParameters() {
On 2013/01/15 09:54:51, karlklose wrote:
> Perhaps you should add a few tests using methods instead of constructors.

Done.

Powered by Google App Engine
This is Rietveld 408576698