Ignore:
Timestamp:
Apr 27, 2004, 8:39:34 PM (21 years ago)
Author:
bird
Message:

GCC v3.3.3 sources.

Location:
branches/GNU/src/gcc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/gcc

    • Property svn:ignore
      •  

        old new  
        2626configure.vr
        2727configure.vrs
         28dir.info
        2829Makefile
        29 dir.info
        3030lost+found
        3131update.out
  • branches/GNU/src/gcc/libjava/boehm.cc

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11// boehm.cc - interface between libjava and Boehm GC.
    22
    3 /* Copyright (C) 1998, 1999, 2000, 2001  Free Software Foundation
     3/* Copyright (C) 1998, 1999, 2000, 2001, 2002  Free Software Foundation
    44
    55   This file is part of libgcj.
     
    4040};
    4141
    42 // We must check for plausibility ourselves.
    4342#define MAYBE_MARK(Obj, Top, Limit, Source, Exit)  \
    4443        Top=GC_MARK_AND_PUSH((GC_PTR)Obj, Top, Limit, (GC_PTR *)Source)
     
    136135      MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, c6label);
    137136
     137      // The vtable might have been set, but the rest of the class
     138      // could still be uninitialized.  If this is the case, then
     139      // c.isArray will SEGV.  We check for this, and if it is the
     140      // case we just return.
     141      if (__builtin_expect (c->name == NULL, false))
     142        return mark_stack_ptr;
    138143
    139144      if (! c->isArray() && ! c->isPrimitive())
     
    149154              MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c,
    150155                             cm2label);
    151 
    152               // FIXME: `ncode' entry?
    153 
    154 #ifdef INTERPRETER
    155               // The interpreter installs a heap-allocated
    156               // trampoline here, so we'll mark it.
    157               if (_Jv_IsInterpretedClass (c))
    158                   {
    159                       p = (ptr_t) c->methods[i].ncode;
    160                       MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c,
    161                                   cm3label);
    162                   }
    163 #endif
    164156            }
    165157        }
     
    213205      p = (ptr_t) c->arrayclass;
    214206      MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, cDlabel);
     207      p = (ptr_t) c->protectionDomain;
     208      MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c, cPlabel);
    215209
    216210#ifdef INTERPRETER
    217211      if (_Jv_IsInterpretedClass (c))
    218212        {
    219           _Jv_InterpClass* ic = (_Jv_InterpClass*)c;
     213          _Jv_InterpClass* ic = (_Jv_InterpClass*) c;
    220214
    221215          p = (ptr_t) ic->interpreted_methods;
     
    227221              MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, ic, \
    228222                          cFlabel);
     223
     224              // Mark the direct-threaded code.
     225              if ((c->methods[i].accflags
     226                   & java::lang::reflect::Modifier::NATIVE) == 0)
     227                {
     228                  _Jv_InterpMethod *im
     229                    = (_Jv_InterpMethod *) ic->interpreted_methods[i];
     230                  if (im)
     231                    {
     232                      p = (ptr_t) im->prepared;
     233                      MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, ic, \
     234                                  cFlabel);
     235                    }
     236                }
     237
     238              // The interpreter installs a heap-allocated trampoline
     239              // here, so we'll mark it.
     240              p = (ptr_t) c->methods[i].ncode;
     241              MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c,
     242                          cm3label);
    229243            }
    230244
Note: See TracChangeset for help on using the changeset viewer.