Changes: Carolyn Oates
Edwin Steiner
- $Id: parse.c 1421 2004-10-28 14:39:49Z stefan $
+ $Id: parse.c 1429 2004-11-02 08:58:26Z jowenn $
*/
if ((useinlining) && (gp == nextgp)) {
u1 *tptr;
bool *readonly = NULL;
-
+ int argBlockIdx=0;
opcode = code_get_u1(p,inline_env->method);
nextp = p += jcommandsize[opcode];
label_index = tmpinlinf->label_index;
readonly = tmpinlinf->readonly;
+ for (i=0,tptr=tmpinlinf->method->paramtypes;i<tmpinlinf->method->paramcount;i++,tptr++) {
+ if ( ((*tptr)==TYPE_LNG) ||
+ ((*tptr)==TYPE_DBL) )
+ argBlockIdx+=2;
+ else
+ argBlockIdx++;
+ }
for (i = 0, tptr = tmpinlinf->method->paramtypes + tmpinlinf->method->paramcount - 1; i < tmpinlinf->method->paramcount; i++, tptr--) {
int op;
}
op += *tptr;
- OP1(op, firstlocal + tmpinlinf->method->paramcount - 1 - i);
-
+ if ( ((*tptr)==TYPE_LNG) ||
+ ((*tptr)==TYPE_DBL) )
+ argBlockIdx-=2;
+ else
+ argBlockIdx--;
+
+ OP1(op, firstlocal + argBlockIdx);
+ //OP1(op, firstlocal + tmpinlinf->method->paramcount - 1 - i);
+ //printf("inline argument load operation for local: %ld\n",firstlocal + tmpinlinf->method->paramcount - 1 - i);
/*m->basicblockindex[gp] |= (ipc << 1);*/ /*FIXME: necessary ? */
}
if (DEBUG==true) {
/* OP(ICMD_NOP); */
/* break; */
/* } */
+ if (nextp>inline_env->method->jcodelength-1) {
+ //OP1(ICMD_GOTO, inlinfo->stopgp);
+ //OP(ICMD_NOP);
+ //OP(ICMD_NOP);
+ blockend=true;
+ break;
+ }//JJJJJJJ
blockend = true;
OP1(ICMD_GOTO, inlinfo->stopgp);
break;
/* INLINING */
- if (inline_env->isinlinedmethod && p == inline_env->method->jcodelength - 1) { /* end of an inlined method */
+// if (inline_env->isinlinedmethod && p == inline_env->method->jcodelength - 1) { /* end of an inlined method */
+ if (inline_env->isinlinedmethod && (nextp >= inline_env->method->jcodelength) ) { /* end of an inlined method */
/* printf("setting gp from %d to %d\n",gp, inlinfo->stopgp); */
gp = inlinfo->stopgp;
inlining_restore_compiler_variables();
} /* end for */
- if (p != m->jcodelength)
+ if (p != m->jcodelength) {
+ printf("p (%ld) != m->jcodelength (%ld)\n",p,m->jcodelength);
panic("Command-sequence crosses code-boundary");
-
+ }
if (!blockend) {
*exceptionptr = new_verifyerror(m, "Falling off the end of the code");
return NULL;