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

Unified Diff: compiler/java/com/google/dart/compiler/backend/js/ClosureJsCodingConvention.java

Issue 8845002: Function type checking: Part Deux (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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: compiler/java/com/google/dart/compiler/backend/js/ClosureJsCodingConvention.java
diff --git a/compiler/java/com/google/dart/compiler/backend/js/ClosureJsCodingConvention.java b/compiler/java/com/google/dart/compiler/backend/js/ClosureJsCodingConvention.java
index 590c0242a11ad30c5c674aacb7723c37cada5fae..7df87c45b16e8d305a90e8594f51db6b727ea84e 100644
--- a/compiler/java/com/google/dart/compiler/backend/js/ClosureJsCodingConvention.java
+++ b/compiler/java/com/google/dart/compiler/backend/js/ClosureJsCodingConvention.java
@@ -62,43 +62,4 @@ class ClosureJsCodingConvention extends ClosureCodingConvention {
}
return null;
}
-
- /**
- * Determines whether the given node is a function binding call, like
- * "$bind".
- * @return The type of Bind definition, or null.
- */
- @Override
- public Bind describeFunctionBind(Node n) {
- // Check for standard stuff first.
- Bind result = super.describeFunctionBind(n);
- if (result != null) {
- return result;
- }
-
- if (n.getType() != Token.CALL) {
- return null;
- }
-
- // Check for Dartc generated bind function
- Node callTarget = n.getFirstChild();
- if (callTarget.getType() == Token.NAME) {
- if (callTarget.getString().equals("$bind")) {
- // goog.bind(fn, self, args...);
- Node fn = callTarget.getNext();
- Node thisValue = safeNext(fn);
- Node parameters = safeNext(thisValue);
- return new Bind(fn, thisValue, parameters);
- }
- }
-
- return null;
- }
-
- private Node safeNext(Node n) {
- if (n != null) {
- return n.getNext();
- }
- return null;
- }
}

Powered by Google App Engine
This is Rietveld 408576698