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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart

Issue 23766002: Work around runtime engine deficiencies. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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: sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart (revision 26873)
+++ sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart (working copy)
@@ -299,6 +299,12 @@
}
jsAst.Expression visitConstructed(ConstructedConstant constant) {
+ Element element = constant.type.element;
+ if (element.isForeign(compiler)
+ && element.name == const SourceString('JS_CONST')) {
+ StringConstant str = constant.fields[0];
+ return new jsAst.LiteralExpression(str.value.slowToString());
+ }
jsAst.New instantiation = new jsAst.New(
new jsAst.VariableUse(getJsConstructor(constant.type.element)),
_array(constant.fields));

Powered by Google App Engine
This is Rietveld 408576698