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

Unified Diff: pkg/compiler/lib/src/js_backend/constant_system_javascript.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_system_javascript.dart
diff --git a/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart b/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
index 170320c4437679fb0cf8e6cfcde36adf02e4d85a..4b3cb36c54632089aa5244b257bc187e9a7244fa 100644
--- a/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
@@ -10,7 +10,6 @@ import '../constants/values.dart';
import '../common_elements.dart' show CommonElements;
import '../elements/types.dart';
import '../elements/entities.dart';
-import '../tree/dartstring.dart' show DartString, LiteralDartString;
const JAVA_SCRIPT_CONSTANT_SYSTEM = const JavaScriptConstantSystem();
@@ -303,7 +302,7 @@ class JavaScriptConstantSystem extends ConstantSystem {
NumConstantValue createInt32(int i) => new IntConstantValue(i & BITS32);
NumConstantValue createDouble(double d) =>
convertToJavaScriptConstant(new DoubleConstantValue(d));
- StringConstantValue createString(DartString string) {
+ StringConstantValue createString(String string) {
return new StringConstantValue(string);
}
@@ -391,7 +390,7 @@ class JavaScriptConstantSystem extends ConstantSystem {
ConstantValue createSymbol(CommonElements commonElements, String text) {
InterfaceType type = commonElements.symbolImplementationType;
FieldEntity field = commonElements.symbolField;
- ConstantValue argument = createString(new DartString.literal(text));
+ ConstantValue argument = createString(text);
// TODO(johnniwinther): Use type arguments when all uses no longer expect
// a [FieldElement].
Map<FieldEntity, ConstantValue> fields = /*<FieldElement, ConstantValue>*/ {
@@ -406,8 +405,7 @@ class JavaScriptMapConstant extends MapConstantValue {
* The [PROTO_PROPERTY] must not be used as normal property in any JavaScript
* object. It would change the prototype chain.
*/
- static const LiteralDartString PROTO_PROPERTY =
- const LiteralDartString("__proto__");
+ static const String PROTO_PROPERTY = "__proto__";
/** The dart class implementing constant map literals. */
static const String DART_CLASS = "ConstantMap";
« no previous file with comments | « pkg/compiler/lib/src/js_backend/constant_emitter.dart ('k') | pkg/compiler/lib/src/js_backend/lookup_map_analysis.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698