bug-kawa
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-kawa] [bug #42689] Bytecode verify error involving use of "location


From: anonymous
Subject: [Bug-kawa] [bug #42689] Bytecode verify error involving use of "location"
Date: Sat, 05 Jul 2014 18:16:14 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20140429 Firefox/24.0 Iceweasel/24.5.0

URL:
  <http://savannah.gnu.org/bugs/?42689>

                 Summary: Bytecode verify error involving use of "location"
                 Project: Kawa
            Submitted by: None
            Submitted on: Sat 05 Jul 2014 06:16:13 PM UTC
                Category: Code generation
                Severity: 3 - Normal
              Item Group: Run-time exception
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

This code:

#| begin test.scm contents |#
(define-macro (increment! var delta)
    (let ((loc (gentemp))) `(let ((,loc (location ,var))) (set! (,loc) (+
(,loc) ,delta))))
)

(define-simple-class accumulator ()
    (value::double 0)
    ;if the next line is uncommented, and the line after that commented, the
example works as expected
    ;((accumulate delta::double) (increment! (field (this) "value") delta))
    ((accumulate delta::double) (increment! value delta))
)

(define x (accumulator))
(x:accumulate .5)
(display x:value) (newline)
#| end test.scm contents |#

when compiled and run as "java kawa.repl --main -C test.scm && java test"
gives the following output:
-----
(compiling test.scm to test)
java.lang.VerifyError: (class: accumulator, method: $finit$ signature: ()V)
Incompatible object argument for function call
        at test.run(test.scm:5)
        at gnu.expr.ModuleBody.runAsMain(ModuleBody.java:152)
        at test.main(test.scm)
-----

Explicitly accessing the field, as in the commented line, works correctly.

This happens both with the binary distribution kawa-1.14.jar, and with a copy
built from SVN revision 7945.

----------

In response to the "Did you check to see if this item has already been
submitted?" prompt: Bug #14640 looks like it has a similar triggering
condition (usage of location to achieve single-evaluation in the spirit of
CL's get-setf-expansion), but different output.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?42689>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]