summaryrefslogtreecommitdiff
path: root/libre/clojure/clojure-replace_asm.patch
blob: 0c41a37e9f9cc30659b8fba9c6a487bb659adfcc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
--- clojure-1.7.0.orig/build.xml	2015-06-30 09:23:20.000000000 -0500
+++ clojure-1.7.0/build.xml	2015-12-09 17:37:31.497314803 -0500
@@ -38,6 +38,7 @@
   <target name="compile-java" depends="init"
           description="Compile Java sources.">
     <javac srcdir="${jsrc}" destdir="${build}" includeJavaRuntime="yes"
+           classpath="/usr/share/java/asm-4.jar:/usr/share/java/asm-commons-4.jar"
            includeAntRuntime="false"
            debug="true" source="1.6" target="1.6"/>
   </target>
@@ -45,7 +46,7 @@
   <target name="compile-clojure"
           description="Compile Clojure sources.">
     <java classname="clojure.lang.Compile"
-          classpath="${maven.compile.classpath}:${build}:${cljsrc}"
+          classpath="/usr/share/java/asm-4.jar:/usr/share/java/asm-commons-4.jar:${maven.compile.classpath}:${build}:${cljsrc}"
           failonerror="true"
           fork="true">
       <sysproperty key="clojure.compile.path" value="${build}"/>
@@ -87,7 +88,7 @@
     <javac srcdir="${jtestsrc}" destdir="${test-classes}" includeJavaRuntime="yes"
            debug="true" source="1.6" target="1.6" includeantruntime="no"/>
     <java classname="clojure.lang.Compile"
-          classpath="${test-classes}:${test}:${build}:${cljsrc}"
+          classpath="/usr/share/java/asm-4.jar:/usr/share/java/asm-commons-4.jar:${test-classes}:${test}:${build}:${cljsrc}"
           failonerror="true"
 	  fork="true">
       <sysproperty key="clojure.compile.path" value="${test-classes}"/>
@@ -106,6 +107,8 @@
     <java classname="clojure.main" failonerror="true" fork="true">
       <classpath>
         <pathelement path="${maven.test.classpath}"/>
+        <path location="/usr/share/java/asm-4.jar"/>
+        <path location="/usr/share/java/asm-commons-4.jar"/>
         <path location="${test-classes}"/>
         <path location="${test}"/>
         <path location="${build}"/>
@@ -122,6 +125,8 @@
     <java classname="clojure.main" failonerror="true" fork="true">
       <classpath>
         <pathelement path="${maven.test.classpath}"/>
+        <path location="/usr/share/java/asm-4.jar"/>
+        <path location="/usr/share/java/asm-commons-4.jar"/>
         <path location="${test-classes}"/>
         <path location="${test}"/>
         <path location="${build}"/>
--- clojure-1.7.0.orig/src/clj/clojure/core.clj	2015-06-30 09:23:20.000000000 -0500
+++ clojure-1.7.0/src/clj/clojure/core.clj	2015-12-09 17:45:49.203841272 -0500
@@ -5222,10 +5222,10 @@
                    (.getAnnotation c java.lang.annotation.Retention)] 
           (= (.value r) java.lang.annotation.RetentionPolicy/RUNTIME)))))
 
-(defn- descriptor [^Class c] (clojure.asm.Type/getDescriptor c))
+(defn- descriptor [^Class c] (org.objectweb.asm.Type/getDescriptor c))
 
 (declare process-annotation)
-(defn- add-annotation [^clojure.asm.AnnotationVisitor av name v]
+(defn- add-annotation [^org.objectweb.asm.AnnotationVisitor av name v]
   (cond
    (vector? v) (let [avec (.visitArray av name)]
                  (doseq [vval v]
@@ -5235,7 +5235,7 @@
                  (cond 
                   (instance? java.lang.Enum ev)
                   (.visitEnum av name (descriptor (class ev)) (str ev))
-                  (class? ev) (.visit av name (clojure.asm.Type/getType ev))
+                  (class? ev) (.visit av name (org.objectweb.asm.Type/getType ev))
                   :else (throw (IllegalArgumentException. 
                                 (str "Unsupported annotation value: " v " of class " (class ev))))))
    (seq? v) (let [[nested nv] v
--- clojure-1.7.0.orig/src/clj/clojure/core_proxy.clj	2015-06-30 09:23:20.000000000 -0500
+++ clojure-1.7.0/src/clj/clojure/core_proxy.clj	2015-12-09 17:47:21.556152289 -0500
@@ -11,9 +11,9 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;; proxy ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (import
- '(clojure.asm ClassWriter ClassVisitor Opcodes Type) 
+ '(org.objectweb.asm ClassWriter ClassVisitor Opcodes Type) 
  '(java.lang.reflect Modifier Constructor)
- '(clojure.asm.commons Method GeneratorAdapter)
+ '(org.objectweb.asm.commons Method GeneratorAdapter)
  '(clojure.lang IProxy Reflector DynamicClassLoader IPersistentMap PersistentHashMap RT))
 
 (defn method-sig [^java.lang.reflect.Method meth]
--- clojure-1.7.0.orig/src/clj/clojure/genclass.clj	2015-06-30 09:23:20.000000000 -0500
+++ clojure-1.7.0/src/clj/clojure/genclass.clj	2015-12-09 17:48:30.376239833 -0500
@@ -9,8 +9,8 @@
 (in-ns 'clojure.core)
 
 (import '(java.lang.reflect Modifier Constructor)
-        '(clojure.asm ClassWriter ClassVisitor Opcodes Type)
-        '(clojure.asm.commons Method GeneratorAdapter)
+        '(org.objectweb.asm ClassWriter ClassVisitor Opcodes Type)
+        '(org.objectweb.asm.commons Method GeneratorAdapter)
         '(clojure.lang IPersistentMap))
 
 ;(defn method-sig [^java.lang.reflect.Method meth]
--- clojure-1.7.0.orig/src/jvm/clojure/lang/Compiler.java	2015-06-30 09:23:20.000000000 -0500
+++ clojure-1.7.0/src/jvm/clojure/lang/Compiler.java	2015-12-09 17:56:08.474634356 -0500
@@ -12,11 +12,12 @@
 
 package clojure.lang;
 
-//*
+/*
 
-import clojure.asm.*;
-import clojure.asm.commons.GeneratorAdapter;
-import clojure.asm.commons.Method;
+import org.objectweb.asm.*;
+import org.objectweb.asm.commons.GeneratorAdapter;
+import org.objectweb.asm.commons.Method;
+*/
 
 import java.io.*;
 import java.lang.reflect.Constructor;
@@ -26,14 +27,15 @@
 import java.util.regex.Matcher;
 
 //*/
-/*
+///*
 
 import org.objectweb.asm.*;
 import org.objectweb.asm.commons.Method;
 import org.objectweb.asm.commons.GeneratorAdapter;
+/*
 import org.objectweb.asm.util.TraceClassVisitor;
 import org.objectweb.asm.util.CheckClassAdapter;
-//*/
+*/
 
 public class Compiler implements Opcodes{
 
--- clojure-1.7.0.orig/src/jvm/clojure/lang/Intrinsics.java	2015-06-30 09:23:20.000000000 -0500
+++ clojure-1.7.0/src/jvm/clojure/lang/Intrinsics.java	2015-12-09 17:58:29.934629288 -0500
@@ -12,7 +12,7 @@
 
 package clojure.lang;
 
-import clojure.asm.Opcodes;
+import org.objectweb.asm.Opcodes;
 
 public class Intrinsics implements Opcodes{
 private static Object[] oa(Object... arr){
--- clojure-1.7.0.orig/src/clj/clojure/reflect/java.clj	2015-06-30 09:23:20.000000000 -0500
+++ clojure-1.7.0/src/clj/clojure/reflect/java.clj	2015-12-09 18:02:15.637317716 -0500
@@ -11,7 +11,7 @@
 
 (require '[clojure.set :as set]
          '[clojure.string :as str])
-(import '[clojure.asm ClassReader ClassVisitor Type Opcodes]
+(import '[org.objectweb.asm ClassReader ClassVisitor Type Opcodes]
          '[java.lang.reflect Modifier]
          java.io.InputStream)
 
--- clojure-1.7.0.orig/test/clojure/test_clojure/reflect.clj	2015-06-30 09:23:20.000000000 -0500
+++ clojure-1.7.0/test/clojure/test_clojure/reflect.clj	2015-12-09 18:04:43.783663964 -0500
@@ -25,7 +25,7 @@
 
 (deftest field-descriptor->class-symbol-test
   (are [s d] (= s (@#'reflect/field-descriptor->class-symbol d))
-       'clojure.asm.Type<><> "[[Lclojure/asm/Type;"
+       'org.objectweb.asm.Type<><> "[[Lclojure/asm/Type;"
        'int "I"
        'java.lang.Object "Ljava.lang.Object;"))
 
--- clojure-1.7.0.orig/pom.xml	2015-06-30 09:23:20.000000000 -0500
+++ clojure-1.7.0/pom.xml	2015-12-09 18:12:28.005103036 -0500
@@ -69,6 +69,16 @@
         </exclusion>
       </exclusions>
     </dependency>
+    <dependency>
+      <groupId>org.ow2.asm</groupId>
+      <artifactId>asm</artifactId>
+      <version>5.0.3</version>
+    </dependency>
+    <dependency>
+      <groupId>org.ow2.asm</groupId>
+      <artifactId>asm-commons</artifactId>
+      <version>5.0.3</version>
+    </dependency>
   </dependencies>
 
   <build>