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

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

Issue 16510003: Make [HTypeConversion] with NO_CHECK code motion invariant to ensure no code is generated for it. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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
« no previous file with comments | « no previous file | tests/compiler/dart2js/generate_at_use_site_test.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) 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 2273 matching lines...) Expand 10 before | Expand all | Expand 10 after
2284 bool get isBooleanConversionCheck => kind == BOOLEAN_CONVERSION_CHECK; 2284 bool get isBooleanConversionCheck => kind == BOOLEAN_CONVERSION_CHECK;
2285 2285
2286 accept(HVisitor visitor) => visitor.visitTypeConversion(this); 2286 accept(HVisitor visitor) => visitor.visitTypeConversion(this);
2287 2287
2288 bool isJsStatement() => isControlFlow(); 2288 bool isJsStatement() => isControlFlow();
2289 bool isControlFlow() => isArgumentTypeCheck || isReceiverTypeCheck; 2289 bool isControlFlow() => isArgumentTypeCheck || isReceiverTypeCheck;
2290 bool canThrow() => isChecked; 2290 bool canThrow() => isChecked;
2291 2291
2292 int typeCode() => HInstruction.TYPE_CONVERSION_TYPECODE; 2292 int typeCode() => HInstruction.TYPE_CONVERSION_TYPECODE;
2293 bool typeEquals(HInstruction other) => other is HTypeConversion; 2293 bool typeEquals(HInstruction other) => other is HTypeConversion;
2294 bool isCodeMotionInvariant() => kind == NO_CHECK;
2294 2295
2295 bool dataEquals(HTypeConversion other) { 2296 bool dataEquals(HTypeConversion other) {
2296 return kind == other.kind 2297 return kind == other.kind
2297 && typeExpression == other.typeExpression 2298 && typeExpression == other.typeExpression
2298 && instructionType == other.instructionType; 2299 && instructionType == other.instructionType;
2299 } 2300 }
2300 } 2301 }
2301 2302
2302 class HRangeConversion extends HCheck { 2303 class HRangeConversion extends HCheck {
2303 HRangeConversion(HInstruction input) : super(<HInstruction>[input]) { 2304 HRangeConversion(HInstruction input) : super(<HInstruction>[input]) {
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
2675 HBasicBlock get start => expression.start; 2676 HBasicBlock get start => expression.start;
2676 HBasicBlock get end { 2677 HBasicBlock get end {
2677 // We don't create a switch block if there are no cases. 2678 // We don't create a switch block if there are no cases.
2678 assert(!statements.isEmpty); 2679 assert(!statements.isEmpty);
2679 return statements.last.end; 2680 return statements.last.end;
2680 } 2681 }
2681 2682
2682 bool accept(HStatementInformationVisitor visitor) => 2683 bool accept(HStatementInformationVisitor visitor) =>
2683 visitor.visitSwitchInfo(this); 2684 visitor.visitSwitchInfo(this);
2684 } 2685 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/generate_at_use_site_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698