jdk/src/share/back/ArrayTypeImpl.c
author ohair
Fri, 22 Aug 2008 12:24:27 -0700
changeset 1090 c5805b1672a6
parent 2 90ce3da70b43
child 5506 202f599c92aa
permissions -rw-r--r--
6732421: Removed old javavm and Classic VM files from the jdk7 sources Reviewed-by: alanb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
 * Copyright 1998-2005 Sun Microsystems, Inc.  All Rights Reserved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
 * have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#include "ArrayTypeImpl.h"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
#include "util.h"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
#include "inStream.h"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
#include "outStream.h"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * Determine the component class by looking thru all classes for
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * one that has the signature of the component and the same class loadeer
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * as the array.  See JVM spec 5.3.3:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 *     If the component type is a reference type, C is marked as having
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 *     been defined by the defining class loader of the component type.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
static jdwpError
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
getComponentClass(JNIEnv *env, jclass arrayClass, char *componentSignature,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
                jclass *componentClassPtr)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
    jobject arrayClassLoader;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
    jclass *classes;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
    jint count;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
    jclass componentClass = NULL;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
    jdwpError serror;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
    jvmtiError error;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
    serror = JDWP_ERROR(NONE);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
    error = classLoader(arrayClass, &arrayClassLoader);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
    if (error != JVMTI_ERROR_NONE) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
        return map2jdwpError(error);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
    error = allLoadedClasses(&classes, &count);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
    if (error != JVMTI_ERROR_NONE) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
        serror = map2jdwpError(error);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
        int i;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
        for (i = 0; (i < count) && (componentClass == NULL); i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
            char *signature = NULL;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
            jclass clazz = classes[i];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
            jboolean match;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
            jvmtiError error;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
            /* signature must match */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
            error = classSignature(clazz, &signature, NULL);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
            if (error != JVMTI_ERROR_NONE) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
                serror = map2jdwpError(error);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
            match = strcmp(signature, componentSignature) == 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
            jvmtiDeallocate(signature);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
            /* if signature matches, get class loader to check if
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
             * it matches
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
             */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
            if (match) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
                jobject loader;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
                error = classLoader(clazz, &loader);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
                if (error != JVMTI_ERROR_NONE) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
                    return map2jdwpError(error);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
                match = isSameObject(env, loader, arrayClassLoader);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
            if (match) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
                componentClass = clazz;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
        jvmtiDeallocate(classes);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
        *componentClassPtr = componentClass;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
    if (serror == JDWP_ERROR(NONE) && componentClass == NULL) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
        /* per JVM spec, component class is always loaded
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
         * before array class, so this should never occur.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
        serror = JDWP_ERROR(NOT_FOUND);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
    return serror;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
static void
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
writeNewObjectArray(JNIEnv *env, PacketOutputStream *out,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
                 jclass arrayClass, jint size, char *componentSignature)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
    WITH_LOCAL_REFS(env, 1) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
        jarray array;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
        jclass componentClass;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
        jdwpError serror;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
        serror = getComponentClass(env, arrayClass,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
                                       componentSignature, &componentClass);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
        if (serror != JDWP_ERROR(NONE)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
            outStream_setError(out, serror);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
            array = JNI_FUNC_PTR(env,NewObjectArray)(env, size, componentClass, 0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
            if (JNI_FUNC_PTR(env,ExceptionOccurred)(env)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
                JNI_FUNC_PTR(env,ExceptionClear)(env);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
                array = NULL;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
            if (array == NULL) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
                outStream_setError(out, JDWP_ERROR(OUT_OF_MEMORY));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
            } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
                (void)outStream_writeByte(out, specificTypeKey(env, array));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
                (void)outStream_writeObjectRef(env, out, array);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
    } END_WITH_LOCAL_REFS(env);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
static void
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
writeNewPrimitiveArray(JNIEnv *env, PacketOutputStream *out,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
                       jclass arrayClass, jint size, char *componentSignature)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
    WITH_LOCAL_REFS(env, 1) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
        jarray array = NULL;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
        switch (componentSignature[0]) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
            case JDWP_TAG(BYTE):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
                array = JNI_FUNC_PTR(env,NewByteArray)(env, size);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
            case JDWP_TAG(CHAR):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
                array = JNI_FUNC_PTR(env,NewCharArray)(env, size);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
            case JDWP_TAG(FLOAT):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
                array = JNI_FUNC_PTR(env,NewFloatArray)(env, size);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
            case JDWP_TAG(DOUBLE):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
                array = JNI_FUNC_PTR(env,NewDoubleArray)(env, size);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
            case JDWP_TAG(INT):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
                array = JNI_FUNC_PTR(env,NewIntArray)(env, size);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
            case JDWP_TAG(LONG):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
                array = JNI_FUNC_PTR(env,NewLongArray)(env, size);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
            case JDWP_TAG(SHORT):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
                array = JNI_FUNC_PTR(env,NewShortArray)(env, size);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
            case JDWP_TAG(BOOLEAN):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
                array = JNI_FUNC_PTR(env,NewBooleanArray)(env, size);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
            default:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
                outStream_setError(out, JDWP_ERROR(TYPE_MISMATCH));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
        if (JNI_FUNC_PTR(env,ExceptionOccurred)(env)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
            JNI_FUNC_PTR(env,ExceptionClear)(env);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
            array = NULL;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
        if (array == NULL) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
            outStream_setError(out, JDWP_ERROR(OUT_OF_MEMORY));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
            (void)outStream_writeByte(out, specificTypeKey(env, array));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
            (void)outStream_writeObjectRef(env, out, array);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
    } END_WITH_LOCAL_REFS(env);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
static jboolean
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
newInstance(PacketInputStream *in, PacketOutputStream *out)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
    JNIEnv *env;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
    char *signature = NULL;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
    char *componentSignature;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
    jclass arrayClass;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
    jint size;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
    jvmtiError error;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
    env = getEnv();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
    arrayClass = inStream_readClassRef(env, in);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
    if (inStream_error(in)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
        return JNI_TRUE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
    size = inStream_readInt(in);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
    if (inStream_error(in)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
        return JNI_TRUE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
    error = classSignature(arrayClass, &signature, NULL);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
    if ( error != JVMTI_ERROR_NONE ) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
        outStream_setError(out, map2jdwpError(error));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
        return JNI_FALSE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
    componentSignature = &signature[1];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
    if ((componentSignature[0] == JDWP_TAG(OBJECT)) ||
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
        (componentSignature[0] == JDWP_TAG(ARRAY))) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
        writeNewObjectArray(env, out, arrayClass, size, componentSignature);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
    } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
        writeNewPrimitiveArray(env, out, arrayClass, size, componentSignature);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
    jvmtiDeallocate(signature);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
    return JNI_TRUE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
void *ArrayType_Cmds[] = { (void *)0x1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
                          ,(void *)newInstance};