LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Cvs-checkins > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: cvs at opencores.org<cvs@o...>
    Date: Sat Dec 30 18:06:10 CET 2006
    Subject: [cvs-checkins] MODIFIED: jop ...
    Top
    Date: 00/06/12 30:18:06

    Modified: jop/java/target/src/common/com/jopdesign/sys GC.java
    Log:
    constants


    Revision Changes Path
    1.28 jop/java/target/src/common/com/jopdesign/sys/GC.java

    http://www.opencores.org/cvsweb.shtml/jop/java/target/src/common/com/jopdesign/sys/GC.java.diff?r1=1.27&r2=1.28

    (In the diff below, changes in quantity of whitespace are not shown.)

    Index: GC.java
    ===================================================================
    RCS file: /cvsroot/martin/jop/java/target/src/common/com/jopdesign/sys/GC.java,v
    retrieving revision 1.27
    retrieving revision 1.28
    diff -u -b -r1.27 -r1.28
    --- GC.java 18 Nov 2006 16:29:43 -0000 1.27
    +++ GC.java 30 Dec 2006 17:06:10 -0000 1.28
    @@ -15,11 +15,23 @@


    static int mem_start; // read from memory
    -static int mem_end;
    // get a effective heap size with fixed handle count
    // for our RT-GC tests
    static int full_heap_size;

    + /**
    + * Size of class header part.
    + * Difference between class struct and method table
    + */
    + static final int CLASS_HEADR = 3;
    + /**
    + * GC_INFO field relativ to start of MTAB.
    + */
    + static final int MTAB2GC_INFO = -2;
    +
    + /**
    + * Fields in the handle structure.
    + */
    static final int HANDLE_SIZE = 7;

    /**
    @@ -121,7 +133,6 @@
    static void init(int mem_size, int addr) {

    addrStaticRefs = addr;
    -mem_end = mem_size-1;
    mem_start = Native.rdMem(0);
    full_heap_size = mem_size-mem_start;
    handle_cnt = full_heap_size/2/(TYPICAL_OBJ_SIZE+HANDLE_SIZE);
    @@ -322,9 +333,9 @@
    // it's a plain object

    // get pointer to method table
    - flags = Native.rdMem(ref+1);
    + flags = Native.rdMem(ref+OFF_MTAB_LEN);
    // get real flags
    - flags = Native.rdMem(flags-2);
    + flags = Native.rdMem(flags-MTAB2GC_INFO);

    for (i=0; flags!=0; ++i) {
    if ((flags|1)!=0) {
    @@ -407,11 +418,9 @@
    for (int i=0; i<size; ++i) {
    int val = Native.rdMem(addr+i);
    Native.wrMem(val, heapPtr+i);
    -if (heapPtr+i<heapStartA || heapPtr+i>=mem_end) JVMHelp.wr("Problem compact");
    }
    // update object pointer to the new location
    Native.wrMem(heapPtr, ref+OFF_PTR);
    -if (ref<mem_start || ref>=heapStartA) JVMHelp.wr("Problem compact 2");
    heapPtr += size;
    }
    ref = Native.rdMem(ref+OFF_NEXT);
    @@ -499,7 +508,7 @@
    // ref. flags used for array marker
    Native.wrMem(IS_OBJ, ref+OFF_TYPE);
    // pointer to method table in the handle
    - Native.wrMem(cons+3, ref+OFF_MTAB_LEN);
    + Native.wrMem(cons+CLASS_HEADR, ref+OFF_MTAB_LEN);
    }

    return ref;



     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.