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

Side by Side Diff: pkg/compiler/lib/src/ssa/nodes.dart

Issue 756903005: Remove computeMask from ConstantValue. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 List<LabelDefinition> labels) { 166 List<LabelDefinition> labels) {
167 HBasicBlock result = addNewBlock(); 167 HBasicBlock result = addNewBlock();
168 result.loopInformation = 168 result.loopInformation =
169 new HLoopInformation(result, target, labels); 169 new HLoopInformation(result, target, labels);
170 return result; 170 return result;
171 } 171 }
172 172
173 HConstant addConstant(ConstantValue constant, Compiler compiler) { 173 HConstant addConstant(ConstantValue constant, Compiler compiler) {
174 HConstant result = constants[constant]; 174 HConstant result = constants[constant];
175 if (result == null) { 175 if (result == null) {
176 TypeMask type = constant.computeMask(compiler); 176 TypeMask type = constant.accept(COMPUTE_TYPE_MASK, compiler);
177 result = new HConstant.internal(constant, type); 177 result = new HConstant.internal(constant, type);
178 entry.addAtExit(result); 178 entry.addAtExit(result);
179 constants[constant] = result; 179 constants[constant] = result;
180 } else if (result.block == null) { 180 } else if (result.block == null) {
181 // The constant was not used anymore. 181 // The constant was not used anymore.
182 entry.addAtExit(result); 182 entry.addAtExit(result);
183 } 183 }
184 return result; 184 return result;
185 } 185 }
186 186
(...skipping 2904 matching lines...) Expand 10 before | Expand all | Expand 10 after
3091 class HDynamicType extends HRuntimeType { 3091 class HDynamicType extends HRuntimeType {
3092 HDynamicType(DynamicType dartType, TypeMask instructionType) 3092 HDynamicType(DynamicType dartType, TypeMask instructionType)
3093 : super(const <HInstruction>[], dartType, instructionType); 3093 : super(const <HInstruction>[], dartType, instructionType);
3094 3094
3095 accept(HVisitor visitor) => visitor.visitDynamicType(this); 3095 accept(HVisitor visitor) => visitor.visitDynamicType(this);
3096 3096
3097 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; 3097 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE;
3098 3098
3099 bool typeEquals(HInstruction other) => other is HDynamicType; 3099 bool typeEquals(HInstruction other) => other is HDynamicType;
3100 } 3100 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698