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

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

Issue 1036873004: Fix printing of HConstant (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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
« 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 visitAwait(HAwait node); 9 R visitAwait(HAwait node);
10 R visitBitAnd(HBitAnd node); 10 R visitBitAnd(HBitAnd node);
(...skipping 2039 matching lines...) Expand 10 before | Expand all | Expand 10 after
2050 : super(<HInstruction>[condition]); 2050 : super(<HInstruction>[condition]);
2051 toString() => 'loop-branch'; 2051 toString() => 'loop-branch';
2052 accept(HVisitor visitor) => visitor.visitLoopBranch(this); 2052 accept(HVisitor visitor) => visitor.visitLoopBranch(this);
2053 } 2053 }
2054 2054
2055 class HConstant extends HInstruction { 2055 class HConstant extends HInstruction {
2056 final ConstantValue constant; 2056 final ConstantValue constant;
2057 HConstant.internal(this.constant, TypeMask constantType) 2057 HConstant.internal(this.constant, TypeMask constantType)
2058 : super(<HInstruction>[], constantType); 2058 : super(<HInstruction>[], constantType);
2059 2059
2060 toString() => 'literal: $constant'; 2060 toString() => 'literal: ${constant.toStructuredString()}';
2061 accept(HVisitor visitor) => visitor.visitConstant(this); 2061 accept(HVisitor visitor) => visitor.visitConstant(this);
2062 2062
2063 bool isConstant() => true; 2063 bool isConstant() => true;
2064 bool isConstantBoolean() => constant.isBool; 2064 bool isConstantBoolean() => constant.isBool;
2065 bool isConstantNull() => constant.isNull; 2065 bool isConstantNull() => constant.isNull;
2066 bool isConstantNumber() => constant.isNum; 2066 bool isConstantNumber() => constant.isNum;
2067 bool isConstantInteger() => constant.isInt; 2067 bool isConstantInteger() => constant.isInt;
2068 bool isConstantString() => constant.isString; 2068 bool isConstantString() => constant.isString;
2069 bool isConstantList() => constant.isList; 2069 bool isConstantList() => constant.isList;
2070 bool isConstantMap() => constant.isMap; 2070 bool isConstantMap() => constant.isMap;
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
3131 class HDynamicType extends HRuntimeType { 3131 class HDynamicType extends HRuntimeType {
3132 HDynamicType(DynamicType dartType, TypeMask instructionType) 3132 HDynamicType(DynamicType dartType, TypeMask instructionType)
3133 : super(const <HInstruction>[], dartType, instructionType); 3133 : super(const <HInstruction>[], dartType, instructionType);
3134 3134
3135 accept(HVisitor visitor) => visitor.visitDynamicType(this); 3135 accept(HVisitor visitor) => visitor.visitDynamicType(this);
3136 3136
3137 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; 3137 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE;
3138 3138
3139 bool typeEquals(HInstruction other) => other is HDynamicType; 3139 bool typeEquals(HInstruction other) => other is HDynamicType;
3140 } 3140 }
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