Changeset 10985


Ignore:
Timestamp:
02/10/06 05:18:36 (18 years ago)
Author:
piso
Message:

DECLARE-SYMBOL: support uninterned symbols.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/jvm.lisp

    r10984 r10985  
    22;;;
    33;;; Copyright (C) 2003-2006 Peter Graves
    4 ;;; $Id: jvm.lisp,v 1.769 2006-02-07 18:06:26 piso Exp $
     4;;; $Id: jvm.lisp,v 1.770 2006-02-10 05:18:36 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    29122912    (declare (type hash-table ht))
    29132913    (unless g
    2914       (let ((*code* *static-code*)
    2915             (s (sanitize symbol)))
    2916         (setf g (symbol-name (gensym)))
    2917         (when s
    2918           (setf g (concatenate 'string g "_" s)))
    2919         (declare-field g +lisp-symbol+)
    2920         (emit 'ldc (pool-string (symbol-name symbol)))
    2921         (emit 'ldc (pool-string (package-name (symbol-package symbol))))
    2922         (emit-invokestatic +lisp-class+ "internInPackage"
    2923                            (list +java-string+ +java-string+) +lisp-symbol+)
    2924         (emit 'putstatic *this-class* g +lisp-symbol+)
    2925         (setf *static-code* *code*)
    2926         (setf (gethash symbol ht) g)))
     2914      (cond ((null (symbol-package symbol))
     2915             (setf g (if *compile-file-truename*
     2916                         (declare-object-as-string symbol)
     2917                         (declare-object symbol))))
     2918            (t
     2919             (let ((*code* *static-code*)
     2920                   (s (sanitize symbol)))
     2921               (setf g (symbol-name (gensym)))
     2922               (when s
     2923                 (setf g (concatenate 'string g "_" s)))
     2924               (declare-field g +lisp-symbol+)
     2925               (emit 'ldc (pool-string (symbol-name symbol)))
     2926               (emit 'ldc (pool-string (package-name (symbol-package symbol))))
     2927               (emit-invokestatic +lisp-class+ "internInPackage"
     2928                                  (list +java-string+ +java-string+) +lisp-symbol+)
     2929               (emit 'putstatic *this-class* g +lisp-symbol+)
     2930               (setf *static-code* *code*)
     2931               (setf (gethash symbol ht) g)))))
    29272932    g))
    29282933
     
    59275932    (emit 'aload environment-register)
    59285933    (emit 'putfield +lisp-thread-class+ "lastSpecialBinding" +lisp-special-binding+)
    5929 ;;     (when (eq representation :int)
    5930 ;;       (emit-unbox-fixnum))
    5931     (fix-boxing representation nil)
    5932 ;;     (emit-move-from-stack target representation)
    5933     ))
     5934    (fix-boxing representation nil)))
    59345935
    59355936(defun p2-quote (form target representation)
Note: See TracChangeset for help on using the changeset viewer.