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

Unified Diff: sdk/lib/_internal/compiler/implementation/compile_time_constants.dart

Issue 11365170: Start new design for interceptors and implement String.charCodeAt with it. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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/compile_time_constants.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/compile_time_constants.dart (revision 14732)
+++ sdk/lib/_internal/compiler/implementation/compile_time_constants.dart (working copy)
@@ -350,6 +350,8 @@
}
Constant visitLiteralString(LiteralString node) {
+ compiler.enqueuer.codegen.registerSpecialInstantiatedClass(
+ compiler.jsStringClass);
ahe 2012/11/09 13:45:29 Looks like a good candidate for a small shared met
ngeoffray 2012/11/13 11:45:16 Done.
return constantSystem.createString(node.dartString, node);
}
@@ -357,6 +359,8 @@
StringConstant left = evaluate(node.first);
StringConstant right = evaluate(node.second);
if (left == null || right == null) return null;
+ compiler.enqueuer.codegen.registerSpecialInstantiatedClass(
+ compiler.jsStringClass);
return constantSystem.createString(
new DartString.concat(left.value, right.value), node);
}
@@ -364,6 +368,8 @@
Constant visitStringInterpolation(StringInterpolation node) {
StringConstant initialString = evaluate(node.string);
if (initialString == null) return null;
+ compiler.enqueuer.codegen.registerSpecialInstantiatedClass(
+ compiler.jsStringClass);
DartString accumulator = initialString.value;
for (StringInterpolationPart part in node.parts) {
Constant expression = evaluate(part.expression);

Powered by Google App Engine
This is Rietveld 408576698