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

Unified Diff: pkg/compiler/lib/src/js_backend/constant_emitter.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/js_backend/constant_emitter.dart
diff --git a/pkg/compiler/lib/src/js_backend/constant_emitter.dart b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
index 51080bafa30789d91e7d25894758ddaf30a91903..9498a41a6349525de20789bce11ae014a9007200 100644
--- a/pkg/compiler/lib/src/js_backend/constant_emitter.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
@@ -165,8 +165,7 @@ class ConstantEmitter implements ConstantValueVisitor<jsAst.Expression, Null> {
*/
@override
jsAst.Expression visitString(StringConstantValue constant, [_]) {
- return js.escapedString(constant.primitiveValue.slowToString(),
- ascii: true);
+ return js.escapedString(constant.primitiveValue, ascii: true);
}
@override
@@ -303,7 +302,7 @@ class ConstantEmitter implements ConstantValueVisitor<jsAst.Expression, Null> {
ClassElement element = constant.type.element;
if (backend.isForeign(element) && element.name == 'JS_CONST') {
StringConstantValue str = constant.fields.values.single;
- String value = str.primitiveValue.slowToString();
+ String value = str.primitiveValue;
return new jsAst.LiteralExpression(stripComments(value));
}
jsAst.Expression constructor =
« no previous file with comments | « pkg/compiler/lib/src/inferrer/type_system.dart ('k') | pkg/compiler/lib/src/js_backend/constant_system_javascript.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698