Ignore:
Timestamp:
09/04/16 07:01:04 (5 years ago)
Author:
Mark Evenson
Message:

[PATCH 4/5] Runtime class improvements.
From faceaa2be78d92b6a6c43f5925fae926f9607bce Mon Sep 17 00:00:00 2001
Work in progress to get to a more functioning runtime class support.

  • Make static functions and :int parameters work.
  • Fix return conversion for null.
  • Ensure that the same classloader is used.

Because otherwise the name of the superclass couldn't be found as it's
not cached anywhere.

It would probably make sense to make the normal classloader a caching
one, so that custom classes can be found by other parts of the (Java)
system?

---

src/org/armedbear/lisp/LispObject.java | 3 +
src/org/armedbear/lisp/Nil.java | 15 +++
src/org/armedbear/lisp/jvm-instructions.lisp | 27 ++++++
src/org/armedbear/lisp/runtime-class.lisp | 139 +++++++++++++++++++--------
test/lisp/abcl/runtime-class.lisp | 101 +++++++++----------
5 files changed, 186 insertions(+), 99 deletions(-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/jvm-instructions.lisp

    r14407 r14858  
    462462    (t (emit 'astore index))))
    463463
     464(defknown iload (fixnum) t)
     465(defun iload (index)
     466  (case index
     467    (0 (emit 'iload_0))
     468    (1 (emit 'iload_1))
     469    (2 (emit 'iload_2))
     470    (3 (emit 'iload_3))
     471    (t (emit 'iload index))))
     472
     473(defknown istore (fixnum) t)
     474(defun istore (index)
     475  (case index
     476    (0 (emit 'istore_0))
     477    (1 (emit 'istore_1))
     478    (2 (emit 'istore_2))
     479    (3 (emit 'istore_3))
     480    (t (emit 'istore index))))
     481
    464482(declaim (ftype (function (t) t) branch-p)
    465483         (inline branch-p))
     
    572590                 14 ; dconst_0
    573591                 15 ; dconst_1
     592                 26 ; iload_0
     593                 27 ; iload_1
     594                 28 ; iload_2
     595                 29 ; iload_3
    574596                 42 ; aload_0
    575597                 43 ; aload_1
     
    581603                 49 ; daload
    582604                 50 ; aaload
     605                 54 ; istore
     606                 59 ; istore_0
     607                 60 ; istore_1
     608                 61 ; istore_2
     609                 62 ; istore_3
    583610                 75 ; astore_0
    584611                 76 ; astore_1
Note: See TracChangeset for help on using the changeset viewer.