Permalink
Browse files

disable direct binding (and internal reduce with it, for now)

  • Loading branch information...
1 parent 42df6a0 commit a08eac88766fa5eca96d7daf66addc00b70fd1bc @richhickey committed Jun 23, 2010
Showing with 10 additions and 12 deletions.
  1. +1 −1 src/clj/clojure/core.clj
  2. +9 −11 src/jvm/clojure/lang/Compiler.java
View
@@ -5321,7 +5321,7 @@
(load "gvec")
;; redefine reduce with internal-reduce
-(defn reduce
+#_(defn reduce
"f should be a function of 2 arguments. If val is not supplied,
returns the result of applying f to the first 2 items in coll, then
applying f to that result and the 3rd item, etc. If coll contains no
@@ -2878,17 +2878,15 @@ public InvokeExpr(String source, int line, Symbol tag, Expr fexpr, IPersistentVe
this.onMethod = (java.lang.reflect.Method) methods.get(0);
}
}
- else if(pvar == null && VAR_CALLSITES.isBound()
- && fvar.ns.name.name.startsWith("clojure")
- && !RT.booleanCast(RT.get(RT.meta(fvar),dynamicKey))
-// && !fvar.sym.name.equals("report")
-// && fvar.isBound() && fvar.get() instanceof IFn
- )
- {
- //todo - more specific criteria for binding these
- this.isDirect = true;
- this.siteIndex = registerVarCallsite(((VarExpr) fexpr).var);
- }
+// else if(pvar == null && VAR_CALLSITES.isBound()
+// && fvar.ns.name.name.startsWith("clojure")
+// && !RT.booleanCast(RT.get(RT.meta(fvar),dynamicKey))
+// )
+// {
+// //todo - more specific criteria for binding these
+// this.isDirect = true;
+// this.siteIndex = registerVarCallsite(((VarExpr) fexpr).var);
+// }
}
this.tag = tag != null ? tag : (fexpr instanceof VarExpr ? ((VarExpr) fexpr).tag : null);
}

0 comments on commit a08eac8

Please sign in to comment.