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

Issue 1491973002: dart2js: Use correct call structures throughout the backend. (Closed)

Created:
5 years ago by Kevin Millikin (Google)
Modified:
5 years ago
Reviewers:
asgerf, Johnni Winther
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

dart2js: Use correct call structures throughout the backend. When translating to CPS, call arguments are normalized. For known targets, this means default values are passed for missing optional arguments and named arguments are in a canonical order. For unknown targets, this means that passed named arguments are in a canonical order. However, the CallStructure recorded is one that describes the original call. This may have an incorrect number of passed argument or an incorrect order for named arguments. With this change, a new call structure is created describing the call as it appears in the CPS IR. R=johnniwinther@google.com Committed: https://github.com/dart-lang/sdk/commit/f4b80ff12e57a329ef8419b8de1ee4620508793a

Patch Set 1 #

Total comments: 15

Patch Set 2 : Incorporate review comments. #

Patch Set 3 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+240 lines, -174 lines) Patch
M pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart View 1 2 22 chunks +234 lines, -162 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart View 1 chunk +6 lines, -12 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
Kevin Millikin (Google)
I got tired of missing arguments and wrong argument order in the S-expression printed representation. ...
5 years ago (2015-12-02 15:45:31 UTC) #2
Johnni Winther
lgtm https://codereview.chromium.org/1491973002/diff/1/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart File pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart (right): https://codereview.chromium.org/1491973002/diff/1/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart#newcode1345 pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart:1345: elements.getSelector(node), On 2015/12/02 15:45:31, Kevin Millikin (Google) wrote: ...
5 years ago (2015-12-03 12:15:42 UTC) #3
Kevin Millikin (Google)
Committed patchset #3 (id:40001) manually as f4b80ff12e57a329ef8419b8de1ee4620508793a (presubmit successful).
5 years ago (2015-12-09 11:57:15 UTC) #5
Kevin Millikin (Google)
5 years ago (2015-12-09 12:49:13 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/1491973002/diff/1/pkg/compiler/lib/src/cps_ir...
File pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart (right):

https://codereview.chromium.org/1491973002/diff/1/pkg/compiler/lib/src/cps_ir...
pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart:1345:
elements.getSelector(node),
On 2015/12/03 12:15:42, Johnni Winther wrote:
> On 2015/12/02 15:45:31, Kevin Millikin (Google) wrote:
> > It's not obvious whether this selector should match the normalized arguments
> or
> > not.
> 
> We should. Create the new selector by:
> 
> CallStructure callStructure = translateDyn...
> Selector selector = new Selector.call(method.memberName, callStructure);

Done.

https://codereview.chromium.org/1491973002/diff/1/pkg/compiler/lib/src/cps_ir...
pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart:1360:
elements.getSelector(node),
On 2015/12/03 12:15:42, Johnni Winther wrote:
> On 2015/12/02 15:45:31, Kevin Millikin (Google) wrote:
> > It's not obvious whether this selector should match the normalized arguments
> or
> > not.
> 
> Also here. Obtain the member name from `elements.getSelector(node).memberName`
> and a TODO for to supply a [Name] in the visitor.

Done.

https://codereview.chromium.org/1491973002/diff/1/pkg/compiler/lib/src/cps_ir...
pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart:2087: return
buildStaticNoSuchMethod(selector, normalizedArguments);
On 2015/12/03 12:15:42, Johnni Winther wrote:
> On 2015/12/02 15:45:31, Kevin Millikin (Google) wrote:
> > This selector doesn't seem to matter because it looks like only the name is
> > used.
> > 
> > It's not clear if it should match the normalized arguments or not, or if we
> > care.
> 
> Similar to the super-cases above. We should normalize but we need a [Name].
> Generally [buildStaticNoSuchMethod] shouldn't really use [Selector].

Done.

Powered by Google App Engine
This is Rietveld 408576698