Nice/src/bossa/syntax niceMethod.nice,1.26,1.27

Daniel Bonniot <[email protected]> Tue, 29 Mar 2005 16:18:44 +0000
Newsgroups gmane.comp.lang.nice.cvs
Message-ID <[email protected]>
Update of /cvsroot/nice/Nice/src/bossa/syntax
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8586/src/bossa/syntax

Modified Files:
	niceMethod.nice 
Log Message:
Optim: avoid computing the method full name twice

Index: niceMethod.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/niceMethod.nice,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** niceMethod.nice	28 Mar 2005 11:35:15 -0000	1.26
--- niceMethod.nice	29 Mar 2005 16:18:39 -0000	1.27
***************
*** 370,373 ****
--- 370,375 ----
      }
  
+   let fullName = def.getFullName();
+ 
    /*
      If this package is not recompiled,
***************
*** 380,385 ****
    */
    ?gnu.bytecode.Method meth = module.pkg.lookupDispatchClassMethod
!    (receiver == null ? null : receiver.getClassType(),
!     name, "id", def.getFullName());
    if (meth != null) // Reuse existing dispatch method header
      {
--- 382,387 ----
    */
    ?gnu.bytecode.Method meth = module.pkg.lookupDispatchClassMethod
!     (receiver == null ? null : receiver.getClassType(), name, "id", fullName);
! 
    if (meth != null) // Reuse existing dispatch method header
      {
***************
*** 410,414 ****
    // add unique information to disambiguate which method this represents
    res.addBytecodeAttribute
!     (new gnu.bytecode.MiscAttr("id", def.getFullName().getBytes()));
  
    if (receiver != null)
--- 412,416 ----
    // add unique information to disambiguate which method this represents
    res.addBytecodeAttribute
!     (new gnu.bytecode.MiscAttr("id", fullName.getBytes()));
  
    if (receiver != null)



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click