-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(funcall (java:jfield org.armedbear.lisp.Function FUNCTION_CLASS_BYTE… #437
(funcall (java:jfield org.armedbear.lisp.Function FUNCTION_CLASS_BYTE… #437
Conversation
…S) function) vs (java:jcall getFunctionClassBytes classloader class), which didn't work in all cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Rework and move change to probing available disassemblers to a separate commit.
-
Explain/change why calling
getFunctionClassBytes()
should be modified.
(eval-when (:load-toplevel) | ||
(defvar *available-disassemblers* | ||
(let ((files | ||
(directory (merge-pathnames |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One cannot assume the presences of a the ABCL-INTROSPECT in the core implementation. Additionally, the presence of the function in a file does not necessarily mean the assembler is available, as it might have unsatisfied Maven load dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there aren't any disassemblers then available-disassemblers will be nil. It's a directory probe which simply fails. The require loads the appropriate system, which resolves the maven dependencies.
@@ -149,7 +165,9 @@ SYS:*DISASSEMBLERS*." | |||
(if (or (java:jinstance-of-p classloader "org.armedbear.lisp.MemoryClassLoader") | |||
(java:jinstance-of-p classloader "org.armedbear.lisp.FaslClassLoader")) | |||
(disassemble-bytes | |||
(java:jcall "getFunctionClassBytes" classloader class)) | |||
(funcall (java:jfield "org.armedbear.lisp.Function" "FUNCTION_CLASS_BYTES") function) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this better than calling getFunctionClassBytes
on the classloader? Perhaps it is an additional strategy, rather than a strict replacement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getFunctionClassBytes didn't work sometimes and I couldn't figure out why, but this works. Should be tracked down. By someone else ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, we should modify by adding the strategy to an (or (ignore-errors [CASE A]) (ignore-errors …
clause as it will break even less often…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine with me.
Contains changes from #43 |
Originally part of <armedbear#437>
I separated out the FUNCALL fallback into #462. The dependency on the ABCL-INTROSPECT contrib should not be present in the core ANSI code, so if you wish to rework that as part of a load of ABCL-INTROSPECT, I will consider such a patch separately. |
…S) function) vs (java:jcall getFunctionClassBytes classloader class), which didn't work in all cases