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

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

Issue 12018015: Implement substitution for type variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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 2260 matching lines...) Expand 10 before | Expand all | Expand 10 after
2271 class HIs extends HInstruction { 2271 class HIs extends HInstruction {
2272 final DartType typeExpression; 2272 final DartType typeExpression;
2273 final bool nullOk; 2273 final bool nullOk;
2274 2274
2275 HIs(this.typeExpression, List<HInstruction> inputs, {this.nullOk: false}) 2275 HIs(this.typeExpression, List<HInstruction> inputs, {this.nullOk: false})
2276 : super(inputs) { 2276 : super(inputs) {
2277 setUseGvn(); 2277 setUseGvn();
2278 } 2278 }
2279 2279
2280 HInstruction get expression => inputs[0]; 2280 HInstruction get expression => inputs[0];
2281 HInstruction getCheck(int index) => inputs[index + 1]; 2281 HInstruction get checkCall => inputs[1];
2282 int get checkCount => inputs.length - 1;
2283 2282
2284 bool hasArgumentChecks() => inputs.length > 1; 2283 bool hasArgumentsCheck() => inputs.length > 1;
2285 2284
2286 HType get guaranteedType => HType.BOOLEAN; 2285 HType get guaranteedType => HType.BOOLEAN;
2287 2286
2288 accept(HVisitor visitor) => visitor.visitIs(this); 2287 accept(HVisitor visitor) => visitor.visitIs(this);
2289 2288
2290 toString() => "$expression is $typeExpression"; 2289 toString() => "$expression is $typeExpression";
2291 2290
2292 int typeCode() => HInstruction.IS_TYPECODE; 2291 int typeCode() => HInstruction.IS_TYPECODE;
2293 bool typeEquals(HInstruction other) => other is HIs; 2292 bool typeEquals(HInstruction other) => other is HIs;
2294 bool dataEquals(HIs other) { 2293 bool dataEquals(HIs other) {
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
2693 HBasicBlock get start => expression.start; 2692 HBasicBlock get start => expression.start;
2694 HBasicBlock get end { 2693 HBasicBlock get end {
2695 // We don't create a switch block if there are no cases. 2694 // We don't create a switch block if there are no cases.
2696 assert(!statements.isEmpty); 2695 assert(!statements.isEmpty);
2697 return statements.last.end; 2696 return statements.last.end;
2698 } 2697 }
2699 2698
2700 bool accept(HStatementInformationVisitor visitor) => 2699 bool accept(HStatementInformationVisitor visitor) =>
2701 visitor.visitSwitchInfo(this); 2700 visitor.visitSwitchInfo(this);
2702 } 2701 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698