This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: symbol patch


Is this related?  How do I fix it?

Error|GLBL000001|2003 10 29 18:06:03.419|main|null
    |/com/merced/dice/DICE
    |
    |java.lang.NoSuchMethodError:
kawa.lib.misc.isSymbol(Ljava/lang/Object;)Z
   
com.merced.dice.util.SchemeUtils.schemeLiteral$To$JavaLiteral(com/merced/di
ce/util/SchemeUtils.scm:59)
   
com.merced.dice.translate.mel.operators.Literal.melLiteral(com/merced/dice/
On Tue, 2003-10-28 at 22:55, Chris Dean wrote:
> 
> A small patch for some symbol procedures in misc.scm:
> 
> - A version of symbol? that checks that the symbol is interned.
> - A version of string->symbol that looks up the intern method at compile
>   time.
> 
> Regards,
> Chris Dean
> 
> cvs server: Diffing kawa/lib
> Index: kawa/lib/ChangeLog
> ===================================================================
> RCS file: /cvs/kawa/kawa/kawa/lib/ChangeLog,v
> retrieving revision 1.104
> diff -u -w -r1.104 ChangeLog
> --- kawa/lib/ChangeLog	29 Oct 2003 01:46:25 -0000	1.104
> +++ kawa/lib/ChangeLog	29 Oct 2003 06:54:41 -0000
> @@ -1,3 +1,8 @@
> +2003-10-28  Chris Dean  <Chris.Dean@sokitomi.com>
> +
> +	* misc.scm (symbol?, string->symbol): check that the symbol is
> +    	interned and optimization intern call.
> +
>  2003-10-28  Per Bothner  <per@bothner.com>
>  
>  	* files.scm (system-tmpdir):  Micro-optimization.
> Index: kawa/lib/misc.scm
> ===================================================================
> RCS file: /cvs/kawa/kawa/kawa/lib/misc.scm,v
> retrieving revision 1.24
> diff -u -w -r1.24 misc.scm
> --- kawa/lib/misc.scm	31 May 2003 01:39:55 -0000	1.24
> +++ kawa/lib/misc.scm	29 Oct 2003 06:54:41 -0000
> @@ -10,13 +10,15 @@
>    (instance? x <java.lang.Boolean>))
>  
>  (define (symbol? x)
> -  (instance? x <java.lang.String>))
> +  (and (instance? x <java.lang.String>)
> +       (eq? x
> +            (invoke (as <java.lang.String> x) 'intern))))
>  
>  (define (symbol->string (s <symbol>))
>    (make <string> s))
>  
>  (define (string->symbol (str <string>))
> -  (invoke (invoke str 'toString) 'intern))
> +  (invoke (as <java.lang.String> (invoke str 'toString)) 'intern))
>  
>  (define (procedure? x)
>    (and (instance? x <function>) (not (instance? x <gnu.mapping.Location>))))
> 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]