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

Side by Side Diff: pkg/compiler/lib/src/ssa/locals_handler.dart

Issue 2981543002: Handle type variable test and typed list literal. (Closed)
Patch Set: Updated cf. comment Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/ssa/graph_builder.dart ('k') | pkg/compiler/lib/src/ssa/optimize.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import '../closure.dart'; 5 import '../closure.dart';
6 import '../common.dart'; 6 import '../common.dart';
7 import '../elements/elements.dart'; 7 import '../elements/elements.dart';
8 import '../elements/entities.dart'; 8 import '../elements/entities.dart';
9 import '../elements/types.dart'; 9 import '../elements/types.dart';
10 import '../io/source_information.dart'; 10 import '../io/source_information.dart';
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 CommonMasks get commonMasks => closedWorld.commonMasks; 82 CommonMasks get commonMasks => closedWorld.commonMasks;
83 83
84 GlobalTypeInferenceResults get _globalInferenceResults => 84 GlobalTypeInferenceResults get _globalInferenceResults =>
85 builder.globalInferenceResults; 85 builder.globalInferenceResults;
86 86
87 /// Substituted type variables occurring in [type] into the context of 87 /// Substituted type variables occurring in [type] into the context of
88 /// [contextClass]. 88 /// [contextClass].
89 DartType substInContext(DartType type) { 89 DartType substInContext(DartType type) {
90 if (contextClass != null) { 90 if (contextClass != null) {
91 ClassElement typeContext = DartTypes.getClassContext(type); 91 ClassEntity typeContext = DartTypes.getClassContext(type);
92 if (typeContext != null) { 92 if (typeContext != null) {
93 type = builder.types.substByContext( 93 type = builder.types.substByContext(
94 type, 94 type,
95 builder.types.asInstanceOf( 95 builder.types.asInstanceOf(
96 builder.types.getThisType(contextClass), typeContext)); 96 builder.types.getThisType(contextClass), typeContext));
97 } 97 }
98 } 98 }
99 if (instanceType != null) { 99 if (instanceType != null) {
100 type = builder.types.substByContext(type, instanceType); 100 type = builder.types.substByContext(type, instanceType);
101 } 101 }
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 final MemberEntity memberContext; 673 final MemberEntity memberContext;
674 674
675 // Avoid slow Object.hashCode. 675 // Avoid slow Object.hashCode.
676 final int hashCode = _nextHashCode = (_nextHashCode + 1).toUnsigned(30); 676 final int hashCode = _nextHashCode = (_nextHashCode + 1).toUnsigned(30);
677 static int _nextHashCode = 0; 677 static int _nextHashCode = 0;
678 678
679 SyntheticLocal(this.name, this.executableContext, this.memberContext); 679 SyntheticLocal(this.name, this.executableContext, this.memberContext);
680 680
681 toString() => 'SyntheticLocal($name)'; 681 toString() => 'SyntheticLocal($name)';
682 } 682 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/graph_builder.dart ('k') | pkg/compiler/lib/src/ssa/optimize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698