summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2008-07-13 20:41:18 +0000
committerRich Hickey <richhickey@gmail.com>2008-07-13 20:41:18 +0000
commit42e5b5d18450321c7af932722a0342549ee60428 (patch)
tree37b517940f8bca4e61fe1b8100df2cc344b44c99
parent62a1e8b8983b944ae178fe79dac1f6e769546aea (diff)
removed support for finalize, as providing stub causes it to exist, with great performance cost
-rw-r--r--src/genclass.clj7
-rw-r--r--src/proxy.clj5
2 files changed, 7 insertions, 5 deletions
diff --git a/src/genclass.clj b/src/genclass.clj
index e0bec46a..cdc09845 100644
--- a/src/genclass.clj
+++ b/src/genclass.clj
@@ -28,13 +28,14 @@
(seq (. c (getDeclaredMethods)))
(seq (. c (getMethods))))]
(if meths
- (let [#^Method meth (first meths)
+ (let [#^java.lang.reflect.Method meth (first meths)
mods (. meth (getModifiers))
mk (method-sig meth)]
(if (or (considered mk)
(. Modifier (isPrivate mods))
(. Modifier (isStatic mods))
- (. Modifier (isFinal mods)))
+ (. Modifier (isFinal mods))
+ (= "finalize" (.getName meth)))
(recur mm (conj considered mk) (rest meths))
(recur (assoc mm mk meth) (conj considered mk) (rest meths))))
[mm considered]))]
@@ -246,7 +247,7 @@
(. gen (endMethod))))
]
;start class definition
- (. cv (visit (. Opcodes V1_5) (. Opcodes ACC_PUBLIC)
+ (. cv (visit (. Opcodes V1_5) (+ (. Opcodes ACC_PUBLIC) (. Opcodes ACC_SUPER))
cname nil (iname super)
(when interfaces
(into-array (map iname interfaces)))))
diff --git a/src/proxy.clj b/src/proxy.clj
index 486b6f41..f72111a4 100644
--- a/src/proxy.clj
+++ b/src/proxy.clj
@@ -94,7 +94,7 @@
(. gen (endMethod))))]
;start class definition
- (. cv (visit (. Opcodes V1_5) (. Opcodes ACC_PUBLIC)
+ (. cv (visit (. Opcodes V1_5) (+ (. Opcodes ACC_PUBLIC) (. Opcodes ACC_SUPER))
cname nil (iname super)
(into-array (map iname (cons IProxy interfaces)))))
;add field for fn mappings
@@ -157,7 +157,8 @@
(if (or (considered mk)
(. Modifier (isPrivate mods))
(. Modifier (isStatic mods))
- (. Modifier (isFinal mods)))
+ (. Modifier (isFinal mods))
+ (= "finalize" (.getName meth)))
(recur mm (conj considered mk) (rest meths))
(recur (assoc mm mk meth) (conj considered mk) (rest meths))))
[mm considered]))]