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

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

Issue 1916053003: Add toStructuredText to ConstantExpression and align method names with ConstantValue (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: dartfmt Created 4 years, 8 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
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 import '../closure.dart'; 5 import '../closure.dart';
6 import '../common.dart'; 6 import '../common.dart';
7 import '../compiler.dart' show Compiler; 7 import '../compiler.dart' show Compiler;
8 import '../constants/constant_system.dart'; 8 import '../constants/constant_system.dart';
9 import '../constants/values.dart'; 9 import '../constants/values.dart';
10 import '../dart_types.dart'; 10 import '../dart_types.dart';
(...skipping 2191 matching lines...) Expand 10 before | Expand all | Expand 10 after
2202 : super(<HInstruction>[condition]); 2202 : super(<HInstruction>[condition]);
2203 toString() => 'loop-branch'; 2203 toString() => 'loop-branch';
2204 accept(HVisitor visitor) => visitor.visitLoopBranch(this); 2204 accept(HVisitor visitor) => visitor.visitLoopBranch(this);
2205 } 2205 }
2206 2206
2207 class HConstant extends HInstruction { 2207 class HConstant extends HInstruction {
2208 final ConstantValue constant; 2208 final ConstantValue constant;
2209 HConstant.internal(this.constant, TypeMask constantType) 2209 HConstant.internal(this.constant, TypeMask constantType)
2210 : super(<HInstruction>[], constantType); 2210 : super(<HInstruction>[], constantType);
2211 2211
2212 toString() => 'literal: ${constant.toStructuredString()}'; 2212 toString() => 'literal: ${constant.toStructuredText()}';
2213 accept(HVisitor visitor) => visitor.visitConstant(this); 2213 accept(HVisitor visitor) => visitor.visitConstant(this);
2214 2214
2215 bool isConstant() => true; 2215 bool isConstant() => true;
2216 bool isConstantBoolean() => constant.isBool; 2216 bool isConstantBoolean() => constant.isBool;
2217 bool isConstantNull() => constant.isNull; 2217 bool isConstantNull() => constant.isNull;
2218 bool isConstantNumber() => constant.isNum; 2218 bool isConstantNumber() => constant.isNum;
2219 bool isConstantInteger() => constant.isInt; 2219 bool isConstantInteger() => constant.isInt;
2220 bool isConstantString() => constant.isString; 2220 bool isConstantString() => constant.isString;
2221 bool isConstantList() => constant.isList; 2221 bool isConstantList() => constant.isList;
2222 bool isConstantMap() => constant.isMap; 2222 bool isConstantMap() => constant.isMap;
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
3261 class HDynamicType extends HRuntimeType { 3261 class HDynamicType extends HRuntimeType {
3262 HDynamicType(DynamicType dartType, TypeMask instructionType) 3262 HDynamicType(DynamicType dartType, TypeMask instructionType)
3263 : super(const <HInstruction>[], dartType, instructionType); 3263 : super(const <HInstruction>[], dartType, instructionType);
3264 3264
3265 accept(HVisitor visitor) => visitor.visitDynamicType(this); 3265 accept(HVisitor visitor) => visitor.visitDynamicType(this);
3266 3266
3267 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; 3267 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE;
3268 3268
3269 bool typeEquals(HInstruction other) => other is HDynamicType; 3269 bool typeEquals(HInstruction other) => other is HDynamicType;
3270 } 3270 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/serialization/values.dart ('k') | pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698