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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ssa/nodes.dart

Issue 12218007: Implement substitution for type variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of ssa; 5 part of ssa;
6 6
7 abstract class HVisitor<R> { 7 abstract class HVisitor<R> {
8 R visitAdd(HAdd node); 8 R visitAdd(HAdd node);
9 R visitBailoutTarget(HBailoutTarget node); 9 R visitBailoutTarget(HBailoutTarget node);
10 R visitBitAnd(HBitAnd node); 10 R visitBitAnd(HBitAnd node);
(...skipping 2264 matching lines...) Expand 10 before | Expand all | Expand 10 after
2275 class HIs extends HInstruction { 2275 class HIs extends HInstruction {
2276 final DartType typeExpression; 2276 final DartType typeExpression;
2277 final bool nullOk; 2277 final bool nullOk;
2278 2278
2279 HIs(this.typeExpression, List<HInstruction> inputs, {this.nullOk: false}) 2279 HIs(this.typeExpression, List<HInstruction> inputs, {this.nullOk: false})
2280 : super(inputs) { 2280 : super(inputs) {
2281 setUseGvn(); 2281 setUseGvn();
2282 } 2282 }
2283 2283
2284 HInstruction get expression => inputs[0]; 2284 HInstruction get expression => inputs[0];
2285 HInstruction getCheck(int index) => inputs[index + 1]; 2285 HInstruction get checkCall => inputs[1];
2286 int get checkCount => inputs.length - 1;
2287 2286
2288 bool hasArgumentChecks() => inputs.length > 1; 2287 bool hasArgumentsCheck() => inputs.length > 1;
2289 2288
2290 HType get guaranteedType => HType.BOOLEAN; 2289 HType get guaranteedType => HType.BOOLEAN;
2291 2290
2292 accept(HVisitor visitor) => visitor.visitIs(this); 2291 accept(HVisitor visitor) => visitor.visitIs(this);
2293 2292
2294 toString() => "$expression is $typeExpression"; 2293 toString() => "$expression is $typeExpression";
2295 2294
2296 int typeCode() => HInstruction.IS_TYPECODE; 2295 int typeCode() => HInstruction.IS_TYPECODE;
2297 bool typeEquals(HInstruction other) => other is HIs; 2296 bool typeEquals(HInstruction other) => other is HIs;
2298 bool dataEquals(HIs other) { 2297 bool dataEquals(HIs other) {
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
2702 HBasicBlock get start => expression.start; 2701 HBasicBlock get start => expression.start;
2703 HBasicBlock get end { 2702 HBasicBlock get end {
2704 // We don't create a switch block if there are no cases. 2703 // We don't create a switch block if there are no cases.
2705 assert(!statements.isEmpty); 2704 assert(!statements.isEmpty);
2706 return statements.last.end; 2705 return statements.last.end;
2707 } 2706 }
2708 2707
2709 bool accept(HStatementInformationVisitor visitor) => 2708 bool accept(HStatementInformationVisitor visitor) =>
2710 visitor.visitSwitchInfo(this); 2709 visitor.visitSwitchInfo(this);
2711 } 2710 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698