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

Unified Diff: pkg/compiler/lib/src/ssa/optimize.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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/ssa/optimize.dart
diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart
index 4436023b10b8f494823fe8d52977563e52062601..0d8fd85d3bfe6838f86f939b0d3f8632ba8c8c6e 100644
--- a/pkg/compiler/lib/src/ssa/optimize.dart
+++ b/pkg/compiler/lib/src/ssa/optimize.dart
@@ -19,7 +19,6 @@ import '../js_backend/interceptor_data.dart' show InterceptorData;
import '../js_backend/native_data.dart' show NativeData;
import '../native/native.dart' as native;
import '../options.dart';
-import '../tree/dartstring.dart' as ast;
import '../types/types.dart';
import '../universe/selector.dart' show Selector;
import '../universe/side_effects.dart' show SideEffects;
@@ -1135,8 +1134,8 @@ class SsaInstructionSimplifier extends HBaseVisitor
}
HInstruction folded = _graph.addConstant(
- constantSystem.createString(new ast.DartString.concat(
- leftString.primitiveValue, rightString.primitiveValue)),
+ constantSystem.createString(
+ leftString.primitiveValue + rightString.primitiveValue),
_closedWorld);
if (prefix == null) return folded;
return new HStringConcat(
@@ -1161,7 +1160,8 @@ class SsaInstructionSimplifier extends HBaseVisitor
}
PrimitiveConstantValue primitive = constant.constant;
return _graph.addConstant(
- constantSystem.createString(primitive.toDartString()), _closedWorld);
+ constantSystem.createString('${primitive.primitiveValue}'),
+ _closedWorld);
}
HInstruction tryToString() {
« no previous file with comments | « pkg/compiler/lib/src/ssa/nodes.dart ('k') | tests/compiler/dart2js/deferred_follow_constant_dependencies_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698