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: Sun Nov 5 00:28:01 CET 2006
    Subject: [cvs-checkins] MODIFIED: jop ...
    Top
    Date: 00/06/11 05:00:28

    Modified: jop/java/tools/src/com/jopdesign/tools JopSim.java
    Log:
    Moved mtab pointer and array length from the object/array to the handle


    Revision Changes Path
    1.22 jop/java/tools/src/com/jopdesign/tools/JopSim.java

    http://www.opencores.org/cvsweb.shtml/jop/java/tools/src/com/jopdesign/tools/JopSim.java.diff?r1=1.21&r2=1.22

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

    Index: JopSim.java
    ===================================================================
    RCS file: /cvsroot/martin/jop/java/tools/src/com/jopdesign/tools/JopSim.java,v
    retrieving revision 1.21
    retrieving revision 1.22
    diff -u -b -r1.21 -r1.22
    --- JopSim.java 4 Oct 2006 16:21:39 -0000 1.21
    +++ JopSim.java 4 Nov 2006 23:28:00 -0000 1.22
    @@ -45,7 +45,6 @@
    int empty_heap;

    static boolean log = false;
    - static boolean useHandle = false;

    //
    // simulate timer interrupt
    @@ -449,11 +448,8 @@
    int args = off & 0xff; // this is args count without obj-ref
    off >>>= 8;
    int ref = stack[sp-args];
    - if (useHandle) {
    - // handle needs indirection
    - ref = readMem(ref);
    - }
    - int vt = readMem(ref-1);
    + // pointer to method table in handle at offset 1
    + int vt = readMem(ref+1);
    // System.out.println("invvirt: off: "+off+" args: "+args+" ref: "+ref+" vt: "+vt+" addr: "+(vt+off));
    invoke(vt+off);
    }
    @@ -468,12 +464,8 @@
    int args = off & 0xff; // this is args count without obj-ref
    off >>>= 8;
    int ref = stack[sp-args];
    - if (useHandle) {
    - // handle needs indirection
    - ref = readMem(ref);
    - }
    -
    - int vt = readMem(ref-1); // pointer to virtual table in obj-1
    + // pointer to method table in handle at offset 1
    + int vt = readMem(ref+1); // pointer to virtual table in obj-1
    int it = readMem(vt-1); // pointer to interface table one befor vt

    int mp = readMem(it+off);
    @@ -601,10 +593,8 @@
    int off = readOpd16u();
    int val = stack[sp--];
    int ref = stack[sp--];
    - if (useHandle) {
    // handle needs indirection
    ref = readMem(ref);
    - }
    writeMem(ref+off, val);
    }

    @@ -612,10 +602,8 @@

    int off = readOpd16u();
    int ref = stack[sp];
    - if (useHandle) {
    // handle needs indirection
    ref = readMem(ref);
    - }
    stack[sp] = readMem(ref+off);
    }

    @@ -625,10 +613,8 @@
    int val_l = stack[sp--];
    int val_h = stack[sp--];
    int ref = stack[sp--];
    - if (useHandle) {
    // handle needs indirection
    ref = readMem(ref);
    - }
    writeMem(ref+off, val_h);
    writeMem(ref+off+1, val_l);
    }
    @@ -637,10 +623,8 @@

    int off = readOpd16u();
    int ref = stack[sp];
    - if (useHandle) {
    // handle needs indirection
    ref = readMem(ref);
    - }
    stack[sp] = readMem(ref+off);
    stack[++sp] = readMem(ref+off+1);
    } @@ -850,19 +834,17 @@ case 53 : // saload idx = stack[sp--]; // index ref = stack[sp--]; // ref - if (useHandle) { + // null pointer and array check missing // handle needs indirection ref = readMem(ref); - } stack[++sp] = readMem(ref+idx); break; case 47 : // laload idx = stack[sp--]; // index ref = stack[sp--]; // ref - if (useHandle) { + // null pointer and array check missing // handle needs indirection ref = readMem(ref); - } stack[++sp] = readMem(ref+idx*2); stack[++sp] = readMem(ref+idx*2+1); break; @@ -942,10 +924,9 @@ val = stack[sp--]; // value idx = stack[sp--]; // index ref = stack[sp--]; // ref - if (useHandle) { + // null pointer and array check missing // handle needs indirection ref = readMem(ref); - } writeMem(ref+idx, val); break; case 80 : // lastore @@ -953,10 +934,9 @@ val2 = stack[sp--]; // value idx = stack[sp--]; // index ref = stack[sp--]; // ref - if (useHandle) { + // null pointer and array check missing // handle needs indirection ref = readMem(ref); - } writeMem(ref+idx*2, val2); writeMem(ref+idx*2+1, val); break; @@ -1361,12 +1341,8 @@ break; case 190 : // arraylength ref = stack[sp--]; // ref from stack - if (useHandle) { - // handle needs indirection - ref = readMem(ref); - } - --ref; // point to count - stack[++sp] = readMem(ref); + // lenght in handle at offset 1 + stack[++sp] = readMem(ref+1); break; case 191 : // athrow noim(191); @@ -1517,10 +1493,8 @@ // public static native void int2extMem(int intAdr, int extAdr, int cnt); a = stack[sp--]; b = stack[sp--]; - if (useHandle) { // handle needs indirection b = readMem(b); - } c = stack[sp--]; for(; a>=0; --a) { writeMem(b+a, stack[c+a]); @@ -1531,10 +1505,8 @@ a = stack[sp--]; b = stack[sp--]; c = stack[sp--]; - if (useHandle) { // handle needs indirection c = readMem(c); - } for(; a>=0; --a) { stack[b+a] = readMem(c+a); } @@ -1709,7 +1681,6 @@ } log = System.getProperty("log", "false").equals("true"); - useHandle = System.getProperty("handle", "false").equals("true"); // js.portName = System.getProperty("port", "COM1"); // js.openSerialPort();

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