提交 bf4f282e 编写于 作者: A asaha

Merge

......@@ -816,6 +816,7 @@ ca3b8c8e390ab0540b0cc2e5def869b38e460d86 jdk8u75-b01
1f43bd4fab06d2ca5d1964611df14d8506d6b36e jdk8u75-b05
916712f178c39d0acbc590f38802133fc86a7346 jdk8u75-b06
8c791dd1c24d85ebd18b03d49185c2a25263c129 jdk8u75-b07
e4a935cb6f7178912fd653e2a9514eadec7935ab jdk8u75-b08
d7b01fb81aa8a5437cb03bc36afe15cf0e55fb89 jdk8u76-b00
c1679cc87ba045219169cabb6b9b378c2b5cc578 jdk8u76-b01
218483967e52b419d885d34af4488a81c5133804 jdk8u76-b02
......
/*
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -253,29 +253,30 @@ public class Bytecodes {
public static final int _fast_sgetfield = 210;
public static final int _fast_aputfield = 211;
public static final int _fast_bputfield = 212;
public static final int _fast_cputfield = 213;
public static final int _fast_dputfield = 214;
public static final int _fast_fputfield = 215;
public static final int _fast_iputfield = 216;
public static final int _fast_lputfield = 217;
public static final int _fast_sputfield = 218;
public static final int _fast_aload_0 = 219;
public static final int _fast_iaccess_0 = 220;
public static final int _fast_aaccess_0 = 221;
public static final int _fast_faccess_0 = 222;
public static final int _fast_iload = 223;
public static final int _fast_iload2 = 224;
public static final int _fast_icaload = 225;
public static final int _fast_invokevfinal = 226;
public static final int _fast_linearswitch = 227;
public static final int _fast_binaryswitch = 228;
public static final int _fast_aldc = 229;
public static final int _fast_aldc_w = 230;
public static final int _return_register_finalizer = 231;
public static final int _invokehandle = 232;
public static final int _shouldnotreachhere = 233; // For debugging
public static final int number_of_codes = 234;
public static final int _fast_zputfield = 213;
public static final int _fast_cputfield = 214;
public static final int _fast_dputfield = 215;
public static final int _fast_fputfield = 216;
public static final int _fast_iputfield = 217;
public static final int _fast_lputfield = 218;
public static final int _fast_sputfield = 219;
public static final int _fast_aload_0 = 220;
public static final int _fast_iaccess_0 = 221;
public static final int _fast_aaccess_0 = 222;
public static final int _fast_faccess_0 = 223;
public static final int _fast_iload = 224;
public static final int _fast_iload2 = 225;
public static final int _fast_icaload = 226;
public static final int _fast_invokevfinal = 227;
public static final int _fast_linearswitch = 228;
public static final int _fast_binaryswitch = 229;
public static final int _fast_aldc = 230;
public static final int _fast_aldc_w = 231;
public static final int _return_register_finalizer = 232;
public static final int _invokehandle = 233;
public static final int _shouldnotreachhere = 234; // For debugging
public static final int number_of_codes = 235;
// Flag bits derived from format strings, can_trap, can_rewrite, etc.:
// semantic flags:
......@@ -776,6 +777,7 @@ public class Bytecodes {
def(_fast_aputfield , "fast_aputfield" , "bJJ" , null , BasicType.getTObject() , 0, true , _putfield );
def(_fast_bputfield , "fast_bputfield" , "bJJ" , null , BasicType.getTInt() , 0, true , _putfield );
def(_fast_zputfield , "fast_zputfield" , "bJJ" , null , BasicType.getTInt() , 0, true , _putfield );
def(_fast_cputfield , "fast_cputfield" , "bJJ" , null , BasicType.getTChar() , 0, true , _putfield );
def(_fast_dputfield , "fast_dputfield" , "bJJ" , null , BasicType.getTDouble() , 0, true , _putfield );
def(_fast_fputfield , "fast_fputfield" , "bJJ" , null , BasicType.getTFloat() , 0, true , _putfield );
......
......@@ -1121,7 +1121,14 @@ class JNI_ArgumentPusherVaArg : public JNI_ArgumentPusher {
protected:
va_list _ap;
inline void get_bool() { _arguments->push_int(va_arg(_ap, jint)); } // bool is coerced to int when using va_arg
inline void get_bool() {
// Normalize boolean arguments from native code by converting 1-255 to JNI_TRUE and
// 0 to JNI_FALSE. Boolean return values from native are normalized the same in
// TemplateInterpreterGenerator::generate_result_handler_for and
// SharedRuntime::generate_native_wrapper.
jboolean b = va_arg(_ap, jint);
_arguments->push_int((jint)(b == 0 ? JNI_FALSE : JNI_TRUE));
}
inline void get_char() { _arguments->push_int(va_arg(_ap, jint)); } // char is coerced to int when using va_arg
inline void get_short() { _arguments->push_int(va_arg(_ap, jint)); } // short is coerced to int when using va_arg
inline void get_byte() { _arguments->push_int(va_arg(_ap, jint)); } // byte is coerced to int when using va_arg
......@@ -1167,9 +1174,17 @@ class JNI_ArgumentPusherVaArg : public JNI_ArgumentPusher {
while ( 1 ) {
switch ( fingerprint & parameter_feature_mask ) {
case bool_parm:
get_bool();
break;
case char_parm:
get_char();
break;
case short_parm:
get_short();
break;
case byte_parm:
get_byte();
break;
case int_parm:
get_int();
break;
......@@ -1203,7 +1218,14 @@ class JNI_ArgumentPusherArray : public JNI_ArgumentPusher {
protected:
const jvalue *_ap;
inline void get_bool() { _arguments->push_int((jint)(_ap++)->z); }
inline void get_bool() {
// Normalize boolean arguments from native code by converting 1-255 to JNI_TRUE and
// 0 to JNI_FALSE. Boolean return values from native are normalized the same in
// TemplateInterpreterGenerator::generate_result_handler_for and
// SharedRuntime::generate_native_wrapper.
jboolean b = (_ap++)->z;
_arguments->push_int((jint)(b == 0 ? JNI_FALSE : JNI_TRUE));
}
inline void get_char() { _arguments->push_int((jint)(_ap++)->c); }
inline void get_short() { _arguments->push_int((jint)(_ap++)->s); }
inline void get_byte() { _arguments->push_int((jint)(_ap++)->b); }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册