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

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

Issue 2864363002: Remove DartString from constants. (Closed)
Patch Set: Remove toDartString Created 3 years, 7 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_impact.dart ('k') | pkg/compiler/lib/src/ssa/optimize.dart » ('j') | 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 import '../closure.dart'; 5 import '../closure.dart';
6 import '../common.dart'; 6 import '../common.dart';
7 import '../common_elements.dart' show CommonElements; 7 import '../common_elements.dart' show CommonElements;
8 import '../compiler.dart' show Compiler; 8 import '../compiler.dart' show Compiler;
9 import '../constants/constant_system.dart'; 9 import '../constants/constant_system.dart';
10 import '../constants/values.dart'; 10 import '../constants/values.dart';
11 import '../elements/elements.dart' show JumpTarget, LabelDefinition; 11 import '../elements/elements.dart' show JumpTarget, LabelDefinition;
12 import '../elements/entities.dart'; 12 import '../elements/entities.dart';
13 import '../elements/types.dart'; 13 import '../elements/types.dart';
14 import '../io/source_information.dart'; 14 import '../io/source_information.dart';
15 import '../js/js.dart' as js; 15 import '../js/js.dart' as js;
16 import '../js_backend/js_backend.dart'; 16 import '../js_backend/js_backend.dart';
17 import '../native/native.dart' as native; 17 import '../native/native.dart' as native;
18 import '../tree/dartstring.dart' as ast;
19 import '../types/constants.dart' show computeTypeMask; 18 import '../types/constants.dart' show computeTypeMask;
20 import '../types/types.dart'; 19 import '../types/types.dart';
21 import '../universe/selector.dart' show Selector; 20 import '../universe/selector.dart' show Selector;
22 import '../universe/side_effects.dart' show SideEffects; 21 import '../universe/side_effects.dart' show SideEffects;
23 import '../util/util.dart'; 22 import '../util/util.dart';
24 import '../world.dart' show ClosedWorld; 23 import '../world.dart' show ClosedWorld;
25 import 'invoke_dynamic_specializers.dart'; 24 import 'invoke_dynamic_specializers.dart';
26 import 'validate.dart'; 25 import 'validate.dart';
27 26
28 abstract class HVisitor<R> { 27 abstract class HVisitor<R> {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 } 286 }
288 287
289 HConstant addConstantInt(int i, ClosedWorld closedWorld) { 288 HConstant addConstantInt(int i, ClosedWorld closedWorld) {
290 return addConstant(closedWorld.constantSystem.createInt(i), closedWorld); 289 return addConstant(closedWorld.constantSystem.createInt(i), closedWorld);
291 } 290 }
292 291
293 HConstant addConstantDouble(double d, ClosedWorld closedWorld) { 292 HConstant addConstantDouble(double d, ClosedWorld closedWorld) {
294 return addConstant(closedWorld.constantSystem.createDouble(d), closedWorld); 293 return addConstant(closedWorld.constantSystem.createDouble(d), closedWorld);
295 } 294 }
296 295
297 HConstant addConstantString(ast.DartString str, ClosedWorld closedWorld) { 296 HConstant addConstantString(String str, ClosedWorld closedWorld) {
298 return addConstant( 297 return addConstant(
299 closedWorld.constantSystem.createString(str), closedWorld); 298 closedWorld.constantSystem.createString(str), closedWorld);
300 } 299 }
301 300
302 HConstant addConstantStringFromName(js.Name name, ClosedWorld closedWorld) { 301 HConstant addConstantStringFromName(js.Name name, ClosedWorld closedWorld) {
303 return addConstant( 302 return addConstant(
304 new SyntheticConstantValue( 303 new SyntheticConstantValue(
305 SyntheticConstantKind.NAME, js.quoteName(name)), 304 SyntheticConstantKind.NAME, js.quoteName(name)),
306 closedWorld); 305 closedWorld);
307 } 306 }
(...skipping 3237 matching lines...) Expand 10 before | Expand all | Expand 10 after
3545 // ignore: MISSING_RETURN 3544 // ignore: MISSING_RETURN
3546 String get kindAsString { 3545 String get kindAsString {
3547 switch (kind) { 3546 switch (kind) {
3548 case TypeInfoExpressionKind.COMPLETE: 3547 case TypeInfoExpressionKind.COMPLETE:
3549 return 'COMPLETE'; 3548 return 'COMPLETE';
3550 case TypeInfoExpressionKind.INSTANCE: 3549 case TypeInfoExpressionKind.INSTANCE:
3551 return 'INSTANCE'; 3550 return 'INSTANCE';
3552 } 3551 }
3553 } 3552 }
3554 } 3553 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_impact.dart ('k') | pkg/compiler/lib/src/ssa/optimize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698