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

Unified Diff: dart/frog/leg/ssa/builder.dart

Issue 9447100: Return null from stringValue and call slowToString() instead of toString(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: changes Created 8 years, 10 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 | « dart/frog/leg/scanner/token.dart ('k') | dart/frog/leg/ssa/closure.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/ssa/builder.dart
diff --git a/dart/frog/leg/ssa/builder.dart b/dart/frog/leg/ssa/builder.dart
index d4b429f7cde76aceb76d7eedb2c8dfd1570584b1..ef0e5e940ca4825ea5f9230b8646654a8f5d0725 100644
--- a/dart/frog/leg/ssa/builder.dart
+++ b/dart/frog/leg/ssa/builder.dart
@@ -44,19 +44,19 @@ class Interceptors {
}
Element getStaticInterceptor(SourceString name, int parameters) {
- String mangledName = "builtin\$${name}\$${parameters}";
+ String mangledName = "builtin\$${name.slowToString()}\$${parameters}";
Element result = compiler.findHelper(new SourceString(mangledName));
return result;
}
Element getStaticGetInterceptor(SourceString name) {
- String mangledName = "builtin\$get\$${name}";
+ String mangledName = "builtin\$get\$${name.slowToString()}";
Element result = compiler.findHelper(new SourceString(mangledName));
return result;
}
Element getStaticSetInterceptor(SourceString name) {
- String mangledName = "builtin\$set\$${name}";
+ String mangledName = "builtin\$set\$${name.slowToString()}";
Element result = compiler.findHelper(new SourceString(mangledName));
return result;
}
@@ -1196,7 +1196,7 @@ class SsaBuilder implements Visitor {
}
SourceString unquote(LiteralString literal, int start) {
- String str = '${literal.value}';
+ String str = '${literal.value.slowToString()}';
int quotes = 1;
String quote = str[start];
while (str[quotes + start] === quote) quotes++;
@@ -1662,7 +1662,7 @@ class SsaBuilder implements Visitor {
visitForeignSend(Send node) {
Identifier selector = node.selector;
- switch (selector.source.stringValue) {
+ switch (selector.source.slowToString()) {
case "JS":
Link<Node> link = node.arguments;
// If the invoke is on foreign code, don't visit the first
@@ -1675,7 +1675,7 @@ class SsaBuilder implements Visitor {
LiteralString literal = node.arguments.tail.head;
compiler.ensure(literal is LiteralString);
compiler.ensure(type is LiteralString);
- compiler.ensure(literal.value.stringValue[0] == '@');
+ compiler.ensure(literal.value.slowToString()[0] == '@');
push(new HForeign(unquote(literal, 1), unquote(type, 0), inputs));
break;
case "UNINTERCEPTED":
« no previous file with comments | « dart/frog/leg/scanner/token.dart ('k') | dart/frog/leg/ssa/closure.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698