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

Unified Diff: dart/frog/leg/ssa/nodes.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/ssa/codegen.dart ('k') | dart/frog/leg/ssa/tracer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/ssa/nodes.dart
diff --git a/dart/frog/leg/ssa/nodes.dart b/dart/frog/leg/ssa/nodes.dart
index 48e66414f9261cb1f8545a5c7c2b9f08f9a48325..163b915612b3bad42f498e706d1403f13695f611 100644
--- a/dart/frog/leg/ssa/nodes.dart
+++ b/dart/frog/leg/ssa/nodes.dart
@@ -1199,7 +1199,7 @@ class HInvokeStatic extends HInvoke {
HType computeType() {
if (element.isFactoryConstructor()
- && element.enclosingElement.name.toString() == 'List') {
+ && element.enclosingElement.name.slowToString() == 'List') {
builtin = true;
return HType.ARRAY;
}
@@ -1321,10 +1321,10 @@ class HForeign extends HInstruction {
accept(HVisitor visitor) => visitor.visitForeign(this);
HType computeType() {
- if (declaredType.stringValue == 'bool') return HType.BOOLEAN;
- if (declaredType.stringValue == 'int') return HType.INTEGER;
- if (declaredType.stringValue == 'num') return HType.NUMBER;
- if (declaredType.stringValue == 'String') return HType.STRING;
+ if (declaredType.slowToString() == 'bool') return HType.BOOLEAN;
+ if (declaredType.slowToString() == 'int') return HType.INTEGER;
+ if (declaredType.slowToString() == 'num') return HType.NUMBER;
+ if (declaredType.slowToString() == 'String') return HType.STRING;
return HType.UNKNOWN;
}
« no previous file with comments | « dart/frog/leg/ssa/codegen.dart ('k') | dart/frog/leg/ssa/tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698