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

Issue 1146003004: dart2js: Properly construct rti ast templates. (Closed)

Created:
5 years, 7 months ago by herhut
Modified:
5 years, 7 months ago
Reviewers:
floitsch
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -3 lines) Patch
M pkg/compiler/lib/src/js_backend/runtime_types.dart View 1 chunk +10 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/ssa/builder.dart View 1 chunk +1 line, -1 line 4 comments Download

Messages

Total messages: 5 (0 generated)
herhut
Since moving to constructing a full ast, rti annotations with type variables turned into functions ...
5 years, 7 months ago (2015-05-20 13:40:50 UTC) #1
floitsch
LGTM. https://codereview.chromium.org/1146003004/diff/1/pkg/compiler/lib/src/ssa/builder.dart File pkg/compiler/lib/src/ssa/builder.dart (right): https://codereview.chromium.org/1146003004/diff/1/pkg/compiler/lib/src/ssa/builder.dart#newcode3564 pkg/compiler/lib/src/ssa/builder.dart:3564: templates.add(rti.getTypeRepresentationWithPlaceholders(argument, (variable) { long line. https://codereview.chromium.org/1146003004/diff/1/pkg/compiler/lib/src/ssa/builder.dart#newcode3567 pkg/compiler/lib/src/ssa/builder.dart:3567: }, ...
5 years, 7 months ago (2015-05-20 13:48:19 UTC) #2
herhut
Committed patchset #1 (id:1) manually as 0d24a53a560dcf1ce884cdb53478475b0c562a16 (presubmit successful).
5 years, 7 months ago (2015-05-20 13:49:00 UTC) #3
herhut
https://codereview.chromium.org/1146003004/diff/1/pkg/compiler/lib/src/ssa/builder.dart File pkg/compiler/lib/src/ssa/builder.dart (right): https://codereview.chromium.org/1146003004/diff/1/pkg/compiler/lib/src/ssa/builder.dart#newcode3564 pkg/compiler/lib/src/ssa/builder.dart:3564: templates.add(rti.getTypeRepresentationWithPlaceholders(argument, (variable) { On 2015/05/20 13:48:18, floitsch wrote: > ...
5 years, 7 months ago (2015-05-20 14:27:59 UTC) #4
herhut
5 years, 7 months ago (2015-05-20 14:34:12 UTC) #5
Message was sent while issue was closed.
On 2015/05/20 14:27:59, herhut wrote:
>
https://codereview.chromium.org/1146003004/diff/1/pkg/compiler/lib/src/ssa/bu...
> File pkg/compiler/lib/src/ssa/builder.dart (right):
> 
>
https://codereview.chromium.org/1146003004/diff/1/pkg/compiler/lib/src/ssa/bu...
> pkg/compiler/lib/src/ssa/builder.dart:3564:
> templates.add(rti.getTypeRepresentationWithPlaceholders(argument, (variable) {
> On 2015/05/20 13:48:18, floitsch wrote:
> > long line.
> 
> Done.
> 
>
https://codereview.chromium.org/1146003004/diff/1/pkg/compiler/lib/src/ssa/bu...
> pkg/compiler/lib/src/ssa/builder.dart:3567: }, firstPlaceholderIndex :
> inputs.length));
> On 2015/05/20 13:48:18, floitsch wrote:
> > No space after "firstPlaceholderIndex".
> > 
> > I would prefer if it was more explicit.
> > That is, create an `int placeholderIndex = 0` outside.
> > Then, in the closure:
> > 
> >   // The runtimeType has one placeholder.
> >   assert(...);  // If you can find an easy way to check.
> >   placeholderIndex++;
> >   inputs.add(runtimeType);
> > }, firstPlaceholderIndex: placeholderIndex;
> 
> This constructs a template with holes and the corresponding inputs that will
> later fill these holes when we generate the code. So there is always a one to
> one mapping between inputs and holes. That is why the length of the inputs is
> always the correct starting value. 
> 
> Using an explicit counter decouples this on the surface but the underlying
> dependency is still there. How about a comment?

See https://codereview.chromium.org/1143243002.

Powered by Google App Engine
This is Rietveld 408576698