invoker.c revision 0
/*
* Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
#include "util.h"
#include "invoker.h"
#include "eventHandler.h"
#include "threadControl.h"
#include "outStream.h"
static jrawMonitorID invokerLock;
void
invoker_initialize(void)
{
}
void
invoker_reset(void)
{
}
void invoker_lock(void)
{
}
void invoker_unlock(void)
{
}
static jbyte
returnTypeTag(char *signature)
{
tagPtr++; /* 1st character after the end of args */
}
static jbyte
nextArgumentTypeTag(void **cursor)
{
if (*tagPtr != SIGNATURE_END_ARGS) {
/* Skip any array modifiers */
tagPtr++;
}
/* Skip class name */
} else {
/* Skip primitive sig */
tagPtr++;
}
}
return argumentTag;
}
static jbyte
{
return nextArgumentTypeTag(cursor);
}
/*
* Note: argument refs may be destroyed on out-of-memory error
*/
static jvmtiError
{
void *cursor;
if ( request->argumentCount > 0 ) {
/*LINTED*/
} else {
/*LINTED*/
}
}
if ( error == JVMTI_ERROR_NONE ) {
}
}
}
}
argIndex = 0;
while (argumentTag != SIGNATURE_END_ARGS) {
break;
}
/* Create a global ref for any non-null argument */
break;
}
}
}
argument++;
argIndex++;
}
}
#ifdef FIXUP /* Why isn't this an error? */
/* Make sure the argument count matches */
}
#endif
/* Finally, put the global refs into the request if no errors */
if ( error == JVMTI_ERROR_NONE ) {
argIndex = 0;
}
argument++;
argIndex++;
}
}
return JVMTI_ERROR_NONE;
} else {
/* Delete global references */
}
}
}
}
}
}
return error;
}
static jvmtiError
{
/*
* Thread is not at a point where it can invoke.
*/
return AGENT_ERROR_INVALID_THREAD;
}
/*
* Pending invoke
*/
return AGENT_ERROR_ALREADY_INVOKING;
}
request->returnValue.j = 0;
/*
* Squirrel away the method signature
*/
if (error != JVMTI_ERROR_NONE) {
return error;
}
/*
* The given references for class and instance are not guaranteed
* to be around long enough for invocation, so create new ones
* here.
*/
if (error != JVMTI_ERROR_NONE) {
return error;
}
return JVMTI_ERROR_NONE;
}
void
{
}
}
{
}
if (error == JVMTI_ERROR_NONE) {
/* true means it is okay to unblock the commandLoop thread */
} else {
(void)threadControl_resumeAll();
}
}
return error;
}
static void
{
}
}
static void
{
}
break;
}
break;
break;
break;
break;
break;
break;
break;
break;
break;
default:
break;
}
}
static void
{
}
break;
}
break;
break;
break;
break;
break;
break;
break;
break;
break;
default:
break;
}
}
static void
{
}
break;
}
break;
break;
break;
break;
break;
break;
break;
break;
break;
default:
break;
}
}
{
}
if (startNow) {
}
if (!startNow) {
return JNI_FALSE;
}
switch (request->invokeType) {
case INVOKE_CONSTRUCTOR:
break;
case INVOKE_STATIC:
break;
case INVOKE_INSTANCE:
} else {
}
break;
default:
}
}
return JNI_TRUE;
}
void
{
/* Prevent gcc errors on uninitialized variables. */
tag = 0;
id = 0;
eventHandler_lock(); /* for proper lock order */
}
if (!detached) {
} else {
(void)threadControl_suspendAll();
}
/*
* Although constructors technically have a return type of
* void, we return the object created.
*/
} else {
}
}
/*
* Give up the lock before I/O operation
*/
if (!detached) {
}
}
{
}
}
{
}
}
void
{
}