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

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

Issue 123423002: Fix checkedInstructionOrNonGenerateAtUseSite. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 6 years, 7 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 visitBitAnd(HBitAnd node); 9 R visitBitAnd(HBitAnd node);
10 R visitBitNot(HBitNot node); 10 R visitBitNot(HBitNot node);
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 * A pure instruction is an instruction that does not have any side 824 * A pure instruction is an instruction that does not have any side
825 * effect, nor any dependency. They can be moved anywhere in the 825 * effect, nor any dependency. They can be moved anywhere in the
826 * graph. 826 * graph.
827 */ 827 */
828 bool isPure() { 828 bool isPure() {
829 return !sideEffects.hasSideEffects() 829 return !sideEffects.hasSideEffects()
830 && !sideEffects.dependsOnSomething() 830 && !sideEffects.dependsOnSomething()
831 && !canThrow(); 831 && !canThrow();
832 } 832 }
833 833
834 // Overridden by [HCheck] to return the actual non-[HCheck] 834 /// Overridden by [HCheck] to return the actual non-[HCheck]
835 // instruction it checks against. 835 /// instruction it checks against.
836 HInstruction nonCheck() => this; 836 HInstruction nonCheck() => this;
837 837
838 // Can this node throw an exception? 838 /// Can this node throw an exception?
839 bool canThrow() => false; 839 bool canThrow() => false;
840 840
841 // Does this node potentially affect control flow. 841 /// Does this node potentially affect control flow.
842 bool isControlFlow() => false; 842 bool isControlFlow() => false;
843 843
844 bool isExact() => instructionType.isExact || isNull(); 844 bool isExact() => instructionType.isExact || isNull();
845 845
846 bool canBeNull() => instructionType.isNullable; 846 bool canBeNull() => instructionType.isNullable;
847 847
848 bool isNull() => instructionType.isEmpty && instructionType.isNullable; 848 bool isNull() => instructionType.isEmpty && instructionType.isNullable;
849 bool isConflicting() { 849 bool isConflicting() {
850 return instructionType.isEmpty && !instructionType.isNullable; 850 return instructionType.isEmpty && !instructionType.isNullable;
851 } 851 }
(...skipping 2173 matching lines...) Expand 10 before | Expand all | Expand 10 after
3025 class HDynamicType extends HRuntimeType { 3025 class HDynamicType extends HRuntimeType {
3026 HDynamicType(DynamicType dartType, TypeMask instructionType) 3026 HDynamicType(DynamicType dartType, TypeMask instructionType)
3027 : super(const <HInstruction>[], dartType, instructionType); 3027 : super(const <HInstruction>[], dartType, instructionType);
3028 3028
3029 accept(HVisitor visitor) => visitor.visitDynamicType(this); 3029 accept(HVisitor visitor) => visitor.visitDynamicType(this);
3030 3030
3031 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; 3031 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE;
3032 3032
3033 bool typeEquals(HInstruction other) => other is HDynamicType; 3033 bool typeEquals(HInstruction other) => other is HDynamicType;
3034 } 3034 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698