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

Unified Diff: pkg/compiler/lib/src/js_backend/constant_system_javascript.dart

Issue 2018523002: Use correct type on evaluated literal symbols. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | tests/compiler/dart2js/serialization/test_data.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f3d2b4c98e072432885e863e6fbecc5aaf57e05e..410d1c86bbb1fd8c2ac83fe00c8a00a78eb4e98b 100644
--- a/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
@@ -349,11 +349,12 @@ class JavaScriptConstantSystem extends ConstantSystem {
@override
ConstantValue createSymbol(Compiler compiler, String text) {
// TODO(johnniwinther): Create a backend agnostic value.
- InterfaceType type = compiler.coreTypes.symbolType;
+ JavaScriptBackend backend = compiler.backend;
+ ClassElement symbolClass = backend.helpers.symbolImplementationClass;
+ InterfaceType type = symbolClass.rawType;
Siggi Cherem (dart-lang) 2016/05/26 19:52:15 shouldn't symbolClass.rawType and coreTypes.symbol
Johnni Winther 2016/05/27 08:51:24 It's worse. `coreTypes.symbolType` is the one defi
Siggi Cherem (dart-lang) 2016/05/27 17:27:08 yikes - should we change the patch file to directl
Johnni Winther 2016/05/30 07:58:23 I think we want to share the implementation betwee
ConstantValue argument = createString(new DartString.literal(text));
Map<FieldElement, ConstantValue> fields = <FieldElement, ConstantValue>{};
- JavaScriptBackend backend = compiler.backend;
- backend.helpers.symbolImplementationClass.forEachInstanceField(
+ symbolClass.forEachInstanceField(
(ClassElement enclosingClass, FieldElement field) {
fields[field] = argument;
});
« no previous file with comments | « no previous file | tests/compiler/dart2js/serialization/test_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698