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

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

Issue 12310133: Fix for issue 8781: it is not ok to move a HTypeGuard, so mark it as "unpure". (Closed) Base URL: http://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
« no previous file with comments | « no previous file | tests/language/field_increment_bailout_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 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 } 1209 }
1210 1210
1211 void disable() { 1211 void disable() {
1212 isEnabled = false; 1212 isEnabled = false;
1213 instructionType = guarded.instructionType; 1213 instructionType = guarded.instructionType;
1214 } 1214 }
1215 1215
1216 bool isControlFlow() => true; 1216 bool isControlFlow() => true;
1217 bool isJsStatement() => isEnabled; 1217 bool isJsStatement() => isEnabled;
1218 bool canThrow() => isEnabled; 1218 bool canThrow() => isEnabled;
1219 // A [HTypeGuard] cannot be moved anywhere in the graph.
kasperl 2013/02/26 17:36:48 I would add a newline before the comment and exten
ngeoffray 2013/02/27 08:06:54 Done.
1220 bool isPure() => false;
1219 1221
1220 accept(HVisitor visitor) => visitor.visitTypeGuard(this); 1222 accept(HVisitor visitor) => visitor.visitTypeGuard(this);
1221 int typeCode() => HInstruction.TYPE_GUARD_TYPECODE; 1223 int typeCode() => HInstruction.TYPE_GUARD_TYPECODE;
1222 bool typeEquals(other) => other is HTypeGuard; 1224 bool typeEquals(other) => other is HTypeGuard;
1223 bool dataEquals(HTypeGuard other) => guardedType == other.guardedType; 1225 bool dataEquals(HTypeGuard other) => guardedType == other.guardedType;
1224 } 1226 }
1225 1227
1226 class HBoundsCheck extends HCheck { 1228 class HBoundsCheck extends HCheck {
1227 static const int ALWAYS_FALSE = 0; 1229 static const int ALWAYS_FALSE = 0;
1228 static const int FULL_CHECK = 1; 1230 static const int FULL_CHECK = 1;
(...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after
2556 HBasicBlock get start => expression.start; 2558 HBasicBlock get start => expression.start;
2557 HBasicBlock get end { 2559 HBasicBlock get end {
2558 // We don't create a switch block if there are no cases. 2560 // We don't create a switch block if there are no cases.
2559 assert(!statements.isEmpty); 2561 assert(!statements.isEmpty);
2560 return statements.last.end; 2562 return statements.last.end;
2561 } 2563 }
2562 2564
2563 bool accept(HStatementInformationVisitor visitor) => 2565 bool accept(HStatementInformationVisitor visitor) =>
2564 visitor.visitSwitchInfo(this); 2566 visitor.visitSwitchInfo(this);
2565 } 2567 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/field_increment_bailout_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698