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

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

Issue 1198293002: dart2js: Use an abstract Name class for names in the generated JavaScript ast. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix new emitter. Created 5 years, 6 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 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 compiler.backend.constantSystem.createDouble(d), compiler); 204 compiler.backend.constantSystem.createDouble(d), compiler);
205 } 205 }
206 206
207 HConstant addConstantString(ast.DartString str, 207 HConstant addConstantString(ast.DartString str,
208 Compiler compiler) { 208 Compiler compiler) {
209 return addConstant( 209 return addConstant(
210 compiler.backend.constantSystem.createString(str), 210 compiler.backend.constantSystem.createString(str),
211 compiler); 211 compiler);
212 } 212 }
213 213
214 HConstant addConstantStringFromName(js.Name name,
215 Compiler compiler) {
floitsch 2015/06/22 17:43:45 indentation.
herhut 2015/06/23 13:26:32 Done.
216 return addConstant(
217 new SyntheticConstantValue(SyntheticConstantKind.NAME,
218 js.quoteName(name)),
219 compiler);
220 }
221
214 HConstant addConstantBool(bool value, Compiler compiler) { 222 HConstant addConstantBool(bool value, Compiler compiler) {
215 return addConstant( 223 return addConstant(
216 compiler.backend.constantSystem.createBool(value), compiler); 224 compiler.backend.constantSystem.createBool(value), compiler);
217 } 225 }
218 226
219 HConstant addConstantNull(Compiler compiler) { 227 HConstant addConstantNull(Compiler compiler) {
220 return addConstant(compiler.backend.constantSystem.createNull(), compiler); 228 return addConstant(compiler.backend.constantSystem.createNull(), compiler);
221 } 229 }
222 230
223 void finalize() { 231 void finalize() {
(...skipping 2993 matching lines...) Expand 10 before | Expand all | Expand 10 after
3217 class HDynamicType extends HRuntimeType { 3225 class HDynamicType extends HRuntimeType {
3218 HDynamicType(DynamicType dartType, TypeMask instructionType) 3226 HDynamicType(DynamicType dartType, TypeMask instructionType)
3219 : super(const <HInstruction>[], dartType, instructionType); 3227 : super(const <HInstruction>[], dartType, instructionType);
3220 3228
3221 accept(HVisitor visitor) => visitor.visitDynamicType(this); 3229 accept(HVisitor visitor) => visitor.visitDynamicType(this);
3222 3230
3223 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; 3231 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE;
3224 3232
3225 bool typeEquals(HInstruction other) => other is HDynamicType; 3233 bool typeEquals(HInstruction other) => other is HDynamicType;
3226 } 3234 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698