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

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

Issue 114613003: double * int returns a double can be simplified to an int if both operands are constants. Therefore… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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 1913 matching lines...) Expand 10 before | Expand all | Expand 10 after
1924 bool isConstantList() => constant.isList(); 1924 bool isConstantList() => constant.isList();
1925 bool isConstantMap() => constant.isMap(); 1925 bool isConstantMap() => constant.isMap();
1926 bool isConstantFalse() => constant.isFalse(); 1926 bool isConstantFalse() => constant.isFalse();
1927 bool isConstantTrue() => constant.isTrue(); 1927 bool isConstantTrue() => constant.isTrue();
1928 bool isConstantSentinel() => constant.isSentinel(); 1928 bool isConstantSentinel() => constant.isSentinel();
1929 1929
1930 bool isInterceptor(Compiler compiler) => constant.isInterceptor(); 1930 bool isInterceptor(Compiler compiler) => constant.isInterceptor();
1931 1931
1932 // Maybe avoid this if the literal is big? 1932 // Maybe avoid this if the literal is big?
1933 bool isCodeMotionInvariant() => true; 1933 bool isCodeMotionInvariant() => true;
1934
1935 set instructionType(type) {
1936 assert((type.isEmpty && super.instructionType.isEmpty)
1937 || !type.isNullable);
1938 super.instructionType = type;
1939 }
1934 } 1940 }
1935 1941
1936 class HNot extends HInstruction { 1942 class HNot extends HInstruction {
1937 HNot(HInstruction value, TypeMask type) : super(<HInstruction>[value], type) { 1943 HNot(HInstruction value, TypeMask type) : super(<HInstruction>[value], type) {
1938 setUseGvn(); 1944 setUseGvn();
1939 } 1945 }
1940 1946
1941 accept(HVisitor visitor) => visitor.visitNot(this); 1947 accept(HVisitor visitor) => visitor.visitNot(this);
1942 int typeCode() => HInstruction.NOT_TYPECODE; 1948 int typeCode() => HInstruction.NOT_TYPECODE;
1943 bool typeEquals(other) => other is HNot; 1949 bool typeEquals(other) => other is HNot;
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
2899 class HDynamicType extends HRuntimeType { 2905 class HDynamicType extends HRuntimeType {
2900 HDynamicType(DynamicType dartType, TypeMask instructionType) 2906 HDynamicType(DynamicType dartType, TypeMask instructionType)
2901 : super(const <HInstruction>[], dartType, instructionType); 2907 : super(const <HInstruction>[], dartType, instructionType);
2902 2908
2903 accept(HVisitor visitor) => visitor.visitDynamicType(this); 2909 accept(HVisitor visitor) => visitor.visitDynamicType(this);
2904 2910
2905 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; 2911 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE;
2906 2912
2907 bool typeEquals(HInstruction other) => other is HDynamicType; 2913 bool typeEquals(HInstruction other) => other is HDynamicType;
2908 } 2914 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698