clojure-replace_asm.patch 7.4 KB

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