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

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

Issue 109883003: Remove wrong assertion, and make sure we only change the type of constant lists. (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
« no previous file with comments | « no previous file | no next file » | 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 visitBitAnd(HBitAnd node); 9 R visitBitAnd(HBitAnd node);
10 R visitBitNot(HBitNot node); 10 R visitBitNot(HBitNot node);
(...skipping 1915 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 1934
1935 set instructionType(type) { 1935 set instructionType(type) {
1936 assert((type.isEmpty && super.instructionType.isEmpty) 1936 // Only lists can be specialized. The SSA builder uses the
1937 || !type.isNullable); 1937 // inferrer for finding the type of a constant list. We should
1938 assert(!isConstantNull() || (type.isEmpty && type.isNullable)); 1938 // have the constant know its type instead.
1939 if (!isConstantList()) return;
1939 super.instructionType = type; 1940 super.instructionType = type;
1940 } 1941 }
1941 } 1942 }
1942 1943
1943 class HNot extends HInstruction { 1944 class HNot extends HInstruction {
1944 HNot(HInstruction value, TypeMask type) : super(<HInstruction>[value], type) { 1945 HNot(HInstruction value, TypeMask type) : super(<HInstruction>[value], type) {
1945 setUseGvn(); 1946 setUseGvn();
1946 } 1947 }
1947 1948
1948 accept(HVisitor visitor) => visitor.visitNot(this); 1949 accept(HVisitor visitor) => visitor.visitNot(this);
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
2906 class HDynamicType extends HRuntimeType { 2907 class HDynamicType extends HRuntimeType {
2907 HDynamicType(DynamicType dartType, TypeMask instructionType) 2908 HDynamicType(DynamicType dartType, TypeMask instructionType)
2908 : super(const <HInstruction>[], dartType, instructionType); 2909 : super(const <HInstruction>[], dartType, instructionType);
2909 2910
2910 accept(HVisitor visitor) => visitor.visitDynamicType(this); 2911 accept(HVisitor visitor) => visitor.visitDynamicType(this);
2911 2912
2912 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; 2913 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE;
2913 2914
2914 bool typeEquals(HInstruction other) => other is HDynamicType; 2915 bool typeEquals(HInstruction other) => other is HDynamicType;
2915 } 2916 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698