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

Unified Diff: lib/compiler/implementation/ssa/builder.dart

Issue 10140027: Avoid "=== true" inside code by calling a function that does this for us. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revert change to tracer. Created 8 years, 8 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: lib/compiler/implementation/ssa/builder.dart
diff --git a/lib/compiler/implementation/ssa/builder.dart b/lib/compiler/implementation/ssa/builder.dart
index b64b24bc70e12e2dd56d6f4f3ecfb6d2f677a9eb..d9aba2beda977861e38517a1568454949425aeae 100644
--- a/lib/compiler/implementation/ssa/builder.dart
+++ b/lib/compiler/implementation/ssa/builder.dart
@@ -45,26 +45,27 @@ class Interceptors {
Element getStaticInterceptor(SourceString name, int parameters) {
String mangledName = "builtin\$${name.slowToString()}\$${parameters}";
- Element result = compiler.findHelper(new SourceString(mangledName));
- return result;
+ return compiler.findHelper(new SourceString(mangledName));
}
Element getStaticGetInterceptor(SourceString name) {
String mangledName = "builtin\$get\$${name.slowToString()}";
- Element result = compiler.findHelper(new SourceString(mangledName));
- return result;
+ return compiler.findHelper(new SourceString(mangledName));
}
Element getStaticSetInterceptor(SourceString name) {
String mangledName = "builtin\$set\$${name.slowToString()}";
- Element result = compiler.findHelper(new SourceString(mangledName));
- return result;
+ return compiler.findHelper(new SourceString(mangledName));
}
Element getOperatorInterceptor(Operator op) {
SourceString name = mapOperatorToMethodName(op);
- Element result = compiler.findHelper(name);
- return result;
+ return compiler.findHelper(name);
+ }
+
+ Element getBoolifiedVersionOfInterceptor(Element interceptor) {
+ String boolifiedName = "${interceptor.name.slowToString()}B";
+ return compiler.findHelper(new SourceString(boolifiedName));
}
Element getPrefixOperatorInterceptor(Operator op) {

Powered by Google App Engine
This is Rietveld 408576698