|
|
Created:
4 years, 4 months ago by sra1 Modified:
4 years, 3 months ago Reviewers:
Siggi Cherem (dart-lang) CC:
reviews_dartlang.org Base URL:
https://github.com/dart-lang/sdk.git@master Target Ref:
refs/heads/master Visibility:
Public. |
DescriptionFold HTypeInfoReadVariable of instance creation.
This often replaces an expensive substitution read with a re-use of an indexed read, e.g.:
t1 = H.setRuntimeTypeInfo(
new H.WhereIterable(
t1,
new Q.CompositeView_removeChild_closure(view)),
[H.getTypeArgumentByIndex(t1, 0)]);
this.childViews = P.List_List$from(
t1,
true,
H.getRuntimeTypeArgument(t1, "Iterable", 0));
---->
t2 = H.getTypeArgumentByIndex(t1, 0);
this.childViews = P.List_List$from(
H.setRuntimeTypeInfo(
new H.WhereIterable(
t1,
new Q.CompositeView_removeChild_closure(view)),
[t2]),
true,
t2);
R=sigmund@google.com
Committed: https://github.com/dart-lang/sdk/commit/b43ac927708a65fe7b7e8ae7c7fc8233c5b40d84
Reverted: https://github.com/dart-lang/sdk/commit/c3c5ee8c0a99fe55a773ad8abc7c839bd1fb0fa3
Committed: https://github.com/dart-lang/sdk/commit/5b2e0a19fced7b7ccdbf41b88dc2b9e12d6de295
Reverted: https://github.com/dart-lang/sdk/commit/ba11ae416f37d321a4d23f7856353b30c9eaa77c
These test start passing, but only when optimized:
language/mixin_regress_13688_test
language/regress_18713_test
Committed: https://github.com/dart-lang/sdk/commit/0b041d02c67433ea75a8eec683188c3c2585ecff
Patch Set 1 #
Total comments: 2
Patch Set 2 : tidy #Patch Set 3 : reformat #Patch Set 4 : Redo baseline #Patch Set 5 : use finishSubstituted for raw type allocations #Patch Set 6 : baseline #
Messages
Total messages: 17 (11 generated)
Description was changed from ========== Fold HTypeInfoReadVariable of instance creation. ========== to ========== Fold HTypeInfoReadVariable of instance creation. This often replaces an expensive substitution read with a re-use of an indexed read. t1 = H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [H.getTypeArgumentByIndex(t1, 0)]); this.childViews = P.List_List$from( t1, true, H.getRuntimeTypeArgument(t1, "Iterable", 0)); t2 = H.getTypeArgumentByIndex(t1, 0); this.childViews = P.List_List$from( H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [t2]), true, t2); ==========
sra@google.com changed reviewers: + sigmund@google.com
Description was changed from ========== Fold HTypeInfoReadVariable of instance creation. This often replaces an expensive substitution read with a re-use of an indexed read. t1 = H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [H.getTypeArgumentByIndex(t1, 0)]); this.childViews = P.List_List$from( t1, true, H.getRuntimeTypeArgument(t1, "Iterable", 0)); t2 = H.getTypeArgumentByIndex(t1, 0); this.childViews = P.List_List$from( H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [t2]), true, t2); ========== to ========== Fold HTypeInfoReadVariable of instance creation. This often replaces an expensive substitution read with a re-use of an indexed read. t1 = H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [H.getTypeArgumentByIndex(t1, 0)]); this.childViews = P.List_List$from( t1, true, H.getRuntimeTypeArgument(t1, "Iterable", 0)); ----> t2 = H.getTypeArgumentByIndex(t1, 0); this.childViews = P.List_List$from( H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [t2]), true, t2); ==========
Description was changed from ========== Fold HTypeInfoReadVariable of instance creation. This often replaces an expensive substitution read with a re-use of an indexed read. t1 = H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [H.getTypeArgumentByIndex(t1, 0)]); this.childViews = P.List_List$from( t1, true, H.getRuntimeTypeArgument(t1, "Iterable", 0)); ----> t2 = H.getTypeArgumentByIndex(t1, 0); this.childViews = P.List_List$from( H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [t2]), true, t2); ========== to ========== Fold HTypeInfoReadVariable of instance creation. This often replaces an expensive substitution read with a re-use of an indexed read, e.g.: t1 = H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [H.getTypeArgumentByIndex(t1, 0)]); this.childViews = P.List_List$from( t1, true, H.getRuntimeTypeArgument(t1, "Iterable", 0)); ----> t2 = H.getTypeArgumentByIndex(t1, 0); this.childViews = P.List_List$from( H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [t2]), true, t2); ==========
Patchset #1 (id:1) has been deleted
Patchset #1 (id:20001) has been deleted
lgtm https://codereview.chromium.org/2272923002/diff/40001/pkg/compiler/lib/src/ss... File pkg/compiler/lib/src/ssa/optimize.dart (right): https://codereview.chromium.org/2272923002/diff/40001/pkg/compiler/lib/src/ss... pkg/compiler/lib/src/ssa/optimize.dart:1061: ClassElement createdClass, HInstruction select(int index)) { I'm not sure what 'select' means in this context. Could you clarify? Alternatively, maybe rename it, for example we could directly ask callers to provide `getInstructionForTypeVariable`
https://codereview.chromium.org/2272923002/diff/40001/pkg/compiler/lib/src/ss... File pkg/compiler/lib/src/ssa/optimize.dart (right): https://codereview.chromium.org/2272923002/diff/40001/pkg/compiler/lib/src/ss... pkg/compiler/lib/src/ssa/optimize.dart:1061: ClassElement createdClass, HInstruction select(int index)) { On 2016/08/29 19:48:57, Siggi Cherem (dart-lang) wrote: > I'm not sure what 'select' means in this context. Could you clarify? > > Alternatively, maybe rename it, for example we could directly ask callers to > provide `getInstructionForTypeVariable` It is a 'select' because it picks an existing thing. I renamed it to 'selectTypeArgumentFromObjectCreation'.
Description was changed from ========== Fold HTypeInfoReadVariable of instance creation. This often replaces an expensive substitution read with a re-use of an indexed read, e.g.: t1 = H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [H.getTypeArgumentByIndex(t1, 0)]); this.childViews = P.List_List$from( t1, true, H.getRuntimeTypeArgument(t1, "Iterable", 0)); ----> t2 = H.getTypeArgumentByIndex(t1, 0); this.childViews = P.List_List$from( H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [t2]), true, t2); ========== to ========== Fold HTypeInfoReadVariable of instance creation. This often replaces an expensive substitution read with a re-use of an indexed read, e.g.: t1 = H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [H.getTypeArgumentByIndex(t1, 0)]); this.childViews = P.List_List$from( t1, true, H.getRuntimeTypeArgument(t1, "Iterable", 0)); ----> t2 = H.getTypeArgumentByIndex(t1, 0); this.childViews = P.List_List$from( H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [t2]), true, t2); R=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/b43ac927708a65fe7b7e8ae7c7fc8233c5b40d84 ==========
Message was sent while issue was closed.
Committed patchset #3 (id:80001) manually as b43ac927708a65fe7b7e8ae7c7fc8233c5b40d84 (presubmit successful).
Message was sent while issue was closed.
Description was changed from ========== Fold HTypeInfoReadVariable of instance creation. This often replaces an expensive substitution read with a re-use of an indexed read, e.g.: t1 = H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [H.getTypeArgumentByIndex(t1, 0)]); this.childViews = P.List_List$from( t1, true, H.getRuntimeTypeArgument(t1, "Iterable", 0)); ----> t2 = H.getTypeArgumentByIndex(t1, 0); this.childViews = P.List_List$from( H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [t2]), true, t2); R=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/b43ac927708a65fe7b7e8ae7c7fc8233c5b40d84 ========== to ========== Fold HTypeInfoReadVariable of instance creation. This often replaces an expensive substitution read with a re-use of an indexed read, e.g.: t1 = H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [H.getTypeArgumentByIndex(t1, 0)]); this.childViews = P.List_List$from( t1, true, H.getRuntimeTypeArgument(t1, "Iterable", 0)); ----> t2 = H.getTypeArgumentByIndex(t1, 0); this.childViews = P.List_List$from( H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [t2]), true, t2); R=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/b43ac927708a65fe7b7e8ae7c7fc8233c5b40d84 Reverted: https://github.com/dart-lang/sdk/commit/c3c5ee8c0a99fe55a773ad8abc7c839bd1fb0fa3 ==========
Description was changed from ========== Fold HTypeInfoReadVariable of instance creation. This often replaces an expensive substitution read with a re-use of an indexed read, e.g.: t1 = H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [H.getTypeArgumentByIndex(t1, 0)]); this.childViews = P.List_List$from( t1, true, H.getRuntimeTypeArgument(t1, "Iterable", 0)); ----> t2 = H.getTypeArgumentByIndex(t1, 0); this.childViews = P.List_List$from( H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [t2]), true, t2); R=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/b43ac927708a65fe7b7e8ae7c7fc8233c5b40d84 Reverted: https://github.com/dart-lang/sdk/commit/c3c5ee8c0a99fe55a773ad8abc7c839bd1fb0fa3 ========== to ========== Fold HTypeInfoReadVariable of instance creation. This often replaces an expensive substitution read with a re-use of an indexed read, e.g.: t1 = H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [H.getTypeArgumentByIndex(t1, 0)]); this.childViews = P.List_List$from( t1, true, H.getRuntimeTypeArgument(t1, "Iterable", 0)); ----> t2 = H.getTypeArgumentByIndex(t1, 0); this.childViews = P.List_List$from( H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [t2]), true, t2); R=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/b43ac927708a65fe7b7e8ae7c7fc8233c5b40d84 Reverted: https://github.com/dart-lang/sdk/commit/c3c5ee8c0a99fe55a773ad8abc7c839bd1fb0fa3 Committed: https://github.com/dart-lang/sdk/commit/5b2e0a19fced7b7ccdbf41b88dc2b9e12d6de295 ==========
Message was sent while issue was closed.
Committed patchset #5 (id:120001) manually as 5b2e0a19fced7b7ccdbf41b88dc2b9e12d6de295 (presubmit successful).
Message was sent while issue was closed.
Description was changed from ========== Fold HTypeInfoReadVariable of instance creation. This often replaces an expensive substitution read with a re-use of an indexed read, e.g.: t1 = H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [H.getTypeArgumentByIndex(t1, 0)]); this.childViews = P.List_List$from( t1, true, H.getRuntimeTypeArgument(t1, "Iterable", 0)); ----> t2 = H.getTypeArgumentByIndex(t1, 0); this.childViews = P.List_List$from( H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [t2]), true, t2); R=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/b43ac927708a65fe7b7e8ae7c7fc8233c5b40d84 Reverted: https://github.com/dart-lang/sdk/commit/c3c5ee8c0a99fe55a773ad8abc7c839bd1fb0fa3 Committed: https://github.com/dart-lang/sdk/commit/5b2e0a19fced7b7ccdbf41b88dc2b9e12d6de295 ========== to ========== Fold HTypeInfoReadVariable of instance creation. This often replaces an expensive substitution read with a re-use of an indexed read, e.g.: t1 = H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [H.getTypeArgumentByIndex(t1, 0)]); this.childViews = P.List_List$from( t1, true, H.getRuntimeTypeArgument(t1, "Iterable", 0)); ----> t2 = H.getTypeArgumentByIndex(t1, 0); this.childViews = P.List_List$from( H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [t2]), true, t2); R=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/b43ac927708a65fe7b7e8ae7c7fc8233c5b40d84 Reverted: https://github.com/dart-lang/sdk/commit/c3c5ee8c0a99fe55a773ad8abc7c839bd1fb0fa3 Committed: https://github.com/dart-lang/sdk/commit/5b2e0a19fced7b7ccdbf41b88dc2b9e12d6de295 Reverted: https://github.com/dart-lang/sdk/commit/ba11ae416f37d321a4d23f7856353b30c9eaa77c These test start passing, but only when optimized: language/mixin_regress_13688_test language/regress_18713_test ==========
Description was changed from ========== Fold HTypeInfoReadVariable of instance creation. This often replaces an expensive substitution read with a re-use of an indexed read, e.g.: t1 = H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [H.getTypeArgumentByIndex(t1, 0)]); this.childViews = P.List_List$from( t1, true, H.getRuntimeTypeArgument(t1, "Iterable", 0)); ----> t2 = H.getTypeArgumentByIndex(t1, 0); this.childViews = P.List_List$from( H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [t2]), true, t2); R=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/b43ac927708a65fe7b7e8ae7c7fc8233c5b40d84 Reverted: https://github.com/dart-lang/sdk/commit/c3c5ee8c0a99fe55a773ad8abc7c839bd1fb0fa3 Committed: https://github.com/dart-lang/sdk/commit/5b2e0a19fced7b7ccdbf41b88dc2b9e12d6de295 Reverted: https://github.com/dart-lang/sdk/commit/ba11ae416f37d321a4d23f7856353b30c9eaa77c These test start passing, but only when optimized: language/mixin_regress_13688_test language/regress_18713_test ========== to ========== Fold HTypeInfoReadVariable of instance creation. This often replaces an expensive substitution read with a re-use of an indexed read, e.g.: t1 = H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [H.getTypeArgumentByIndex(t1, 0)]); this.childViews = P.List_List$from( t1, true, H.getRuntimeTypeArgument(t1, "Iterable", 0)); ----> t2 = H.getTypeArgumentByIndex(t1, 0); this.childViews = P.List_List$from( H.setRuntimeTypeInfo( new H.WhereIterable( t1, new Q.CompositeView_removeChild_closure(view)), [t2]), true, t2); R=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/b43ac927708a65fe7b7e8ae7c7fc8233c5b40d84 Reverted: https://github.com/dart-lang/sdk/commit/c3c5ee8c0a99fe55a773ad8abc7c839bd1fb0fa3 Committed: https://github.com/dart-lang/sdk/commit/5b2e0a19fced7b7ccdbf41b88dc2b9e12d6de295 Reverted: https://github.com/dart-lang/sdk/commit/ba11ae416f37d321a4d23f7856353b30c9eaa77c These test start passing, but only when optimized: language/mixin_regress_13688_test language/regress_18713_test Committed: https://github.com/dart-lang/sdk/commit/0b041d02c67433ea75a8eec683188c3c2585ecff ==========
Message was sent while issue was closed.
Committed patchset #6 (id:140001) manually as 0b041d02c67433ea75a8eec683188c3c2585ecff (presubmit successful). |