* src/vm/jit/verify/typecheck-invoke.inc: Use invokestatic where
authoredwin <none@none>
Wed, 11 Oct 2006 23:44:52 +0000 (23:44 +0000)
committeredwin <none@none>
Wed, 11 Oct 2006 23:44:52 +0000 (23:44 +0000)
possible. Added a comment.

src/vm/jit/verify/typecheck-invoke.inc

index bc576bc9b9748ddbfa84dc763b9200d0576b2824..7a256dae6fc208370d801e4a114dcf29c9b45539 100644 (file)
@@ -70,7 +70,7 @@
        
        if (!md->params)
                if (!descriptor_params_from_paramtypes(md,
-                                       (opcode == ICMD_INVOKESTATIC) ? ACC_STATIC : ACC_NONE))
+                                       (invokestatic) ? ACC_STATIC : ACC_NONE))
                        return false;
 
        /* check parameter types */
                else {
                        /* non-adress argument. if this is the first argument and we are */
                        /* invoking an instance method, this is an error.                */
-                       if (i==0 && opcode != ICMD_INVOKESTATIC) {
+                       if (i==0 && !invokestatic) {
                                TYPECHECK_VERIFYERROR_bool("Parameter type mismatch for 'this' argument");
                        }
                }
                                TYPECHECK_VERIFYERROR_bool("wrong <init> called for uninitialized reference");
                        }
                }
-       }
+       } /* end if (callinginit) */
 
        /* try to resolve the method lazily */
 
                if (!um) {
                        um = resolve_create_unresolved_method(state->m->class, state->m,
                                        mref, 
-                                       state->iptr->opc == ICMD_INVOKESTATIC,
+                                       invokestatic,
                                        invokespecial);
 
                        if (!um)