Mercurial > hg > truffle
comparison src/share/vm/c1x/c1x_VMEntries.cpp @ 1419:7bf6a77b9c5a
implement recent safepoint & exceptionobject ci changes, HotSpotVMConfig
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Mon, 12 Jul 2010 15:05:17 -0700 |
parents | 712c7ff1afc1 |
children | 6223633ce7dd |
comparison
equal
deleted
inserted
replaced
1418:55ac38887415 | 1419:7bf6a77b9c5a |
---|---|
356 env->register_method(ciMethodObject, -1, &offsets, 0, &buffer, frameSize, &oop_map_set, &handler_table, &inc_table, NULL, env->comp_level(), false, false); | 356 env->register_method(ciMethodObject, -1, &offsets, 0, &buffer, frameSize, &oop_map_set, &handler_table, &inc_table, NULL, env->comp_level(), false, false); |
357 | 357 |
358 } | 358 } |
359 } | 359 } |
360 | 360 |
361 // helpers used to set fields in the HotSpotVMConfig object | |
362 #define SET_CONFIG_BOOLEAN(name, value) { jfieldID id = jniEnv->GetFieldID(klass, #name, "Z"); jniEnv->SetBooleanField(config, id, value); } | |
363 #define SET_CONFIG_INT(name, value) { jfieldID id = jniEnv->GetFieldID(klass, #name, "I"); jniEnv->SetIntField(config, id, value); } | |
364 | |
365 /* | |
366 * Class: com_sun_hotspot_c1x_VMEntries | |
367 * Method: getConfiguration | |
368 * Signature: ()Lcom/sun/hotspot/c1x/HotSpotVMConfig; | |
369 */ | |
370 JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_getConfiguration(JNIEnv *jniEnv, jclass) { | |
371 jclass klass = jniEnv->FindClass("com/sun/hotspot/c1x/HotSpotVMConfig"); | |
372 assert(klass != NULL, "HotSpot vm config class not found"); | |
373 jobject config = jniEnv->AllocObject(klass); | |
374 jfieldID id = jniEnv->GetFieldID(klass, "windowsOs", "Z"); | |
375 #ifdef _WIN64 | |
376 SET_CONFIG_BOOLEAN(windowsOs, true) | |
377 #else | |
378 SET_CONFIG_BOOLEAN(windowsOs, false) | |
379 #endif | |
380 return config; | |
381 } | |
361 | 382 |
362 | 383 |
363 JNINativeMethod VMEntries_methods[] = { | 384 JNINativeMethod VMEntries_methods[] = { |
364 {CC"RiMethod_code", CC"(Ljava/lang/Object;)[B", FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1code)}, | 385 {CC"RiMethod_code", CC"(Ljava/lang/Object;)[B", FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1code)}, |
365 {CC"RiMethod_maxStackSize", CC"(Ljava/lang/Object;)I", FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1maxStackSize)}, | 386 {CC"RiMethod_maxStackSize", CC"(Ljava/lang/Object;)I", FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1maxStackSize)}, |
378 {CC"RiRuntime_getConstantPool", CC"(Ljava/lang/Object;)Lcom/sun/cri/ri/RiConstantPool;", FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiRuntime_1getConstantPool)}, | 399 {CC"RiRuntime_getConstantPool", CC"(Ljava/lang/Object;)Lcom/sun/cri/ri/RiConstantPool;", FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiRuntime_1getConstantPool)}, |
379 {CC"RiType_isArrayClass", CC"(Ljava/lang/Object;)Z", FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiType_1isArrayClass)}, | 400 {CC"RiType_isArrayClass", CC"(Ljava/lang/Object;)Z", FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiType_1isArrayClass)}, |
380 {CC"RiType_isInstanceClass", CC"(Ljava/lang/Object;)Z", FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiType_1isInstanceClass)}, | 401 {CC"RiType_isInstanceClass", CC"(Ljava/lang/Object;)Z", FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiType_1isInstanceClass)}, |
381 {CC"RiType_isInterface", CC"(Ljava/lang/Object;)Z", FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiType_1isInterface)}, | 402 {CC"RiType_isInterface", CC"(Ljava/lang/Object;)Z", FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiType_1isInterface)}, |
382 {CC"RiMethod_accessFlags", CC"(Ljava/lang/Object;)I", FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1accessFlags)}, | 403 {CC"RiMethod_accessFlags", CC"(Ljava/lang/Object;)I", FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1accessFlags)}, |
383 {CC"installCode", CC"(Ljava/lang/Object;[BI)V", FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_installCode)} | 404 {CC"installCode", CC"(Ljava/lang/Object;[BI)V", FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_installCode)}, |
405 {CC"getConfiguration", CC"()Lcom/sun/hotspot/c1x/HotSpotVMConfig;", FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_getConfiguration)} | |
384 }; | 406 }; |
385 | 407 |
386 int VMEntries_methods_count() { | 408 int VMEntries_methods_count() { |
387 return sizeof(VMEntries_methods) / sizeof(JNINativeMethod); | 409 return sizeof(VMEntries_methods) / sizeof(JNINativeMethod); |
388 } | 410 } |