Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename namespaces to remove non-portable "clr" name.

  • Loading branch information...
commit cdf79ad0a05ec0f19d927ba7226890e11d283895 1 parent 211a69e
@frenchy64 frenchy64 authored
View
4 src/clojure/clr/tools/analyzer.clj → src/clojure/tools/analyzer.clj
@@ -1,6 +1,6 @@
(set! *warn-on-reflection* true)
-(ns clojure.clr.tools.analyzer
+(ns clojure.tools.analyzer
"Interface to Compiler's analyze.
Entry point `analyze-path` and `analyze-one`"
(:require [clojure.reflect :as reflect]
@@ -8,7 +8,7 @@
[clojure.repl :as repl]
[clojure.string :as string]
[clojure.set :as set]
- [clojure.clr.tools.analyzer.util])
+ [clojure.tools.analyzer.util])
(:import (System.IO TextReader)
(System.Reflection BindingFlags)
(clojure.lang RT Compiler LineNumberingTextReader)
View
27 src/clojure/clr/tools/analyzer/emit_form.clj → src/clojure/tools/analyzer/emit_form.clj
@@ -1,5 +1,5 @@
-(ns clojure.clr.tools.analyzer.emit-form
- (:require [clojure.clr.tools.analyzer :refer [ast]]))
+(ns clojure.tools.analyzer.emit-form
+ (:require [clojure.tools.analyzer :refer [ast]]))
(def emit-default ::emit-default)
@@ -24,13 +24,13 @@
(defmethod map->form [:keyword emit-default] [{:keys [val]} _] val)
(defmethod map->form [:static-method emit-default]
- [{:keys [class method-name args]} mode]
- `(~(symbol (.getName class) (str method-name))
+ [{:keys [^Type class method-name args]} mode]
+ `(~(symbol (.Name class) (str method-name))
~@(map #(map->form % mode) args)))
(defmethod map->form [:static-field emit-default]
- [{:keys [class field-name]} _]
- (symbol (.getName class) (str field-name)))
+ [{:keys [^Type class field-name]} _]
+ (symbol (.Name class) (str field-name)))
(defmethod map->form [:invoke emit-default]
[{:keys [fexpr args]} mode]
@@ -55,8 +55,8 @@
~@(map #(map->form % mode) args)))
(defmethod map->form [:new emit-default]
- [{:keys [class args]} mode]
- `(new ~(symbol (.getName class))
+ [{:keys [^Type class args]} mode]
+ `(new ~(symbol (.Name class))
~@(map #(map->form % mode) args)))
(defmethod map->form [:empty-expr emit-default] [{:keys [coll]} _] coll)
@@ -117,8 +117,8 @@
`(if ~@(map #(map->form % mode) [test then else])))
(defmethod map->form [:instance-of emit-default]
- [{:keys [class the-expr]} mode]
- `(clojure.core/instance? ~(symbol (.getName class))
+ [{:keys [^Type class the-expr]} mode]
+ `(clojure.core/instance? ~(symbol (.Name class))
~(map->form the-expr mode)))
(defmethod map->form [:def emit-default]
@@ -164,8 +164,8 @@
(when finally-expr [(list 'finally (map->form finally-expr mode))]))))
(defmethod map->form [:catch emit-default]
- [{:keys [class local-binding handler]} mode]
- (list 'catch (symbol (.getName class))
+ [{:keys [^Type class local-binding handler]} mode]
+ (list 'catch (symbol (.Name class))
(map->form local-binding mode)
(map->form handler mode)))
@@ -186,6 +186,9 @@
test-type
skip-check))
+(defmethod map->form [:host-arg emit-default]
+ [{:keys [expr]} mode]
+ (map->form expr))
(comment
(defmacro frm [f]
View
4 ...clr/tools/analyzer/examples/docstring.clj → ...ure/tools/analyzer/examples/docstring.clj
@@ -1,7 +1,7 @@
-(ns clojure.clr.tools.analyzer.examples.docstring
+(ns clojure.tools.analyzer.examples.docstring
"Warns on suspected misplaced docstrings in function definitions.
Entry point `find-and-check-defs`"
- (:require [clojure.clr.tools.analyzer :as analyze]))
+ (:require [clojure.tools.analyzer :as analyze]))
(defn check-def [exp]
(when (= :fn-expr (-> exp :init :op))
View
4 ...e/clr/tools/analyzer/examples/dynvars.clj → ...ojure/tools/analyzer/examples/dynvars.clj
@@ -1,5 +1,5 @@
-(ns clojure.clr.tools.analyzer.examples.dynvars
- (:require [clojure.clr.tools.analyzer :as analyze]))
+(ns clojure.tools.analyzer.examples.dynvars
+ (:require [clojure.tools.analyzer :as analyze]))
(defn earmuffed? [sym]
(let [s (name sym)]
View
4 ...clr/tools/analyzer/examples/load_core.clj → ...ure/tools/analyzer/examples/load_core.clj
@@ -1,6 +1,6 @@
-(ns clojure.clr.tools.analyzer.examples.load-core
+(ns clojure.tools.analyzer.examples.load-core
(:import [clojure.lang Compiler RT DynamicClassLoader])
- (:require [clojure.clr.tools.analyzer :as analyze]))
+ (:require [clojure.tools.analyzer :as analyze]))
(comment
View
4 ...e/clr/tools/analyzer/examples/nsforms.clj → ...ojure/tools/analyzer/examples/nsforms.clj
@@ -1,5 +1,5 @@
-(ns clojure.clr.tools.analyzer.examples.nsforms
- (:require [clojure.clr.tools.analyzer :as analyze]))
+(ns clojure.tools.analyzer.examples.nsforms
+ (:require [clojure.tools.analyzer :as analyze]))
(defn warn-on-naked-use [use-expr]
(doseq [s (map :val (:args use-expr))
View
4 ...r/tools/analyzer/examples/privatevars.clj → ...e/tools/analyzer/examples/privatevars.clj
@@ -1,5 +1,5 @@
-(ns clojure.clr.tools.analyzer.examples.privatevars
- (:require [clojure.clr.tools.analyzer :as analyze]
+(ns clojure.tools.analyzer.examples.privatevars
+ (:require [clojure.tools.analyzer :as analyze]
[clojure.set :as set]
[clojure.pprint :as pp]))
View
4 ...lr/tools/analyzer/examples/reflection.clj → ...re/tools/analyzer/examples/reflection.clj
@@ -1,8 +1,8 @@
(set! *warn-on-reflection* false)
-(ns clojure.clr.tools.analyzer.examples.reflection
+(ns clojure.tools.analyzer.examples.reflection
"Same as *warn-on-reflection*"
- (:require [clojure.clr.tools.analyzer :as analyze]))
+ (:require [clojure.tools.analyzer :as analyze]))
(defn check-new [exp]
(when (not (:ctor exp))
View
4 ...r/tools/analyzer/examples/side_effect.clj → ...e/tools/analyzer/examples/side_effect.clj
@@ -1,7 +1,7 @@
-(ns clojure.clr.tools.analyzer.examples.side-effect
+(ns clojure.tools.analyzer.examples.side-effect
"Warns on invocations of `set!` inside transactions.
Entry point `forbid-side-effects-in-transaction`"
- (:require [clojure.clr.tools.analyzer :as analyze]
+ (:require [clojure.tools.analyzer :as analyze]
[clojure.reflect :as reflect]))
(def transaction-method
View
4 ...ools/analyzer/examples/tail_recursion.clj → ...ools/analyzer/examples/tail_recursion.clj
@@ -1,5 +1,5 @@
-(ns clojure.clr.tools.analyzer.examples.tail-recursion
- (:require [clojure.clr.tools.analyzer :as analyze]))
+(ns clojure.tools.analyzer.examples.tail-recursion
+ (:require [clojure.tools.analyzer :as analyze]))
;; ## Utility functions
View
2  src/clojure/clr/tools/analyzer/fold.clj → src/clojure/tools/analyzer/fold.clj
@@ -1,4 +1,4 @@
-(ns clojure.clr.tools.analyzer.fold)
+(ns clojure.tools.analyzer.fold)
(def fold-expr-default ::fold-expr)
View
6 src/clojure/clr/tools/analyzer/hygienic.clj → src/clojure/tools/analyzer/hygienic.clj
@@ -1,8 +1,8 @@
-(ns clojure.clr.tools.analyzer.hygienic
- (:require [clojure.clr.tools.analyzer
+(ns clojure.tools.analyzer.hygienic
+ (:require [clojure.tools.analyzer
[fold :refer [derive-default-fold add-fold-case fold-expr]]
[emit-form :refer [map->form derive-emit-default]]]
- [clojure.clr.tools.analyzer :refer [ast]]))
+ [clojure.tools.analyzer :refer [ast]]))
(declare hygienic-emit hygienic-ast)
View
2  src/clojure/clr/tools/analyzer/util.clj → src/clojure/tools/analyzer/util.clj
@@ -1,4 +1,4 @@
-(ns clojure.clr.tools.analyzer.util
+(ns clojure.tools.analyzer.util
(:require [clojure.pprint :as pp]))
(defn- dissoc-rec
View
4 test/clojure/clr/tools/analyzer/test.clj → test/clojure/tools/analyzer/test.clj
@@ -1,6 +1,6 @@
-(ns clojure.clr.tools.analyzer.test
+(ns clojure.tools.analyzer.test
(:require [clojure.test :refer :all]
- [clojure.clr.tools.analyzer :refer :all]))
+ [clojure.tools.analyzer :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
Please sign in to comment.
Something went wrong with that request. Please try again.