Opened 10 years ago
Closed 10 years ago
#361 closed defect (invalid)
COMPILE function fails
Reported by: | Mariano Montone | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | compiler | Version: | |
Keywords: | Cc: | ||
Parent Tickets: |
Description
http://clhs.lisp.se/Body/f_cmp.htm fails in the latest ABCL version:
This is what I get when I try to evaluate the example in CLHS:
(defun foo () "bar") => FOO
(compile 'foo)
Wrong number of arguments for #<FUNCTION {5236A94B}>.
[Condition of type PROGRAM-ERROR]
Restarts:
0: [RETRY] Retry SLIME REPL evaluation request.
1: [*ABORT] Return to SLIME's top level.
2: [ABORT] Abort thread.
Backtrace:
0: (#<FUNCTION {752CC03}> #<PROGRAM-ERROR {600776A0}> #<FUNCTION
{752CC03}>)
1: (APPLY #<FUNCTION {752CC03}> (#<PROGRAM-ERROR {600776A0}>
#<FUNCTION {752CC03}>))
2: (SYSTEM::RUN-HOOK SYSTEM::*INVOKE-DEBUGGER-HOOK* #<PROGRAM-ERROR
{600776A0}> #<FUNCTION {752CC03}>)
3: (INVOKE-DEBUGGER #<PROGRAM-ERROR {600776A0}>)
4: org.armedbear.lisp.Lisp.error(Lisp.java:382)
5:
org.armedbear.lisp.CompiledClosure?.notImplemented(CompiledClosure?.java:81)
6: org.armedbear.lisp.CompiledClosure?.execute(CompiledClosure?.java:212)
7: org.armedbear.lisp.CompiledClosure?.execute(CompiledClosure?.java:121)
8:
org.armedbear.lisp.FuncallableStandardObject?.execute(FuncallableStandardObject?.java:117)
9: org.armedbear.lisp.Symbol.execute(Symbol.java:826)
10: org.armedbear.lisp.compiler_pass2_387.execute(compiler-pass2.lisp:7495)
11: org.armedbear.lisp.compiler_pass2_370.execute(compiler-pass2.lisp:7450)
12: org.armedbear.lisp.CompiledClosure?.execute(CompiledClosure?.java:98)
13: org.armedbear.lisp.Symbol.execute(Symbol.java:803)
14: org.armedbear.lisp.compiler_pass2_386.execute(compiler-pass2.lisp:7495)
15: org.armedbear.lisp.Symbol.execute(Symbol.java:838)
16: org.armedbear.lisp.compiler_pass2_388.execute(compiler-pass2.lisp:7519)
17: org.armedbear.lisp.CompiledClosure?.execute(CompiledClosure?.java:109)
18: org.armedbear.lisp.Symbol.execute(Symbol.java:814)
19: org.armedbear.lisp.compiler_pass2_392.execute(compiler-pass2.lisp:7589)
20: org.armedbear.lisp.CompiledClosure?.execute(CompiledClosure?.java:98)
21: org.armedbear.lisp.LispThread?.execute(LispThread?.java:814)
22: org.armedbear.lisp.Lisp.evalCall(Lisp.java:575)
23: org.armedbear.lisp.Lisp.eval(Lisp.java:540)
24: org.armedbear.lisp.Primitives$pfeval.execute(Primitives.java:345)
25: (COMPILE FOO)
I'm not using this directly, but some libraries like closer-mop, need
compile to work.
Fails here:
CL-USER> (lisp-implementation-type)
"Armed Bear Common Lisp"
CL-USER> (lisp-implementation-version)
"1.4.0-dev-svn-14713"
"OpenJDK_64-Bit_Server_VM-Oracle_Corporation-1.7.0_55-b14"
"amd64-Linux-3.5.0-17-generic"
It seems to work in some cases on ABCL 1.3.1, though.
CL-USER> (compile 'foo)
FOO
NIL
NIL
But something like this signals an error:
CL-USER> (compile nil '(lambda (x) x))
; Evaluation aborted on #<PROGRAM-ERROR {4C62C417}>.
With the same error above.
CL-USER> (lisp-implementation-version)
"1.3.1"
"OpenJDK_64-Bit_Server_VM-Oracle_Corporation-1.7.0_55-b14"
"amd64-Linux-3.5.0-17-generic"
Change History (3)
comment:1 Changed 10 years ago by
Summary: | compile function fails → COMPILE function fails |
---|
comment:2 Changed 10 years ago by
comment:3 Changed 10 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
This works fine in a clean version of ABCL. The problem occurs after loading a couple of packages, so the problem may be in those packages, that may be rewriting things? I don't know...
As I noted in my email to armedbear-devel@, I cannot reproduce this in either abcl-1.3.1 nor SVN HEAD, and find this problem somewhat mysterious.
And the CLOSER-MOP test suite continues to pass its tests as far as I can tell.
Perhaps one can try invoking abcl directly with '--noinit' to factor out problems with initialization:
I suppose this could be a problem with openjdk7 under Linux, but I would be surprised.