hotspot/src/share/vm/prims/jni.cpp
changeset 44093 e22e0d071bf9
parent 44088 fb5421685295
child 46338 e84b501fa52e
child 44406 a46a6c4d1dd9
equal deleted inserted replaced
44092:bc842cc2356b 44093:e22e0d071bf9
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
     3  * Copyright (c) 2012 Red Hat, Inc.
     3  * Copyright (c) 2012 Red Hat, Inc.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5  *
     5  *
     6  * This code is free software; you can redistribute it and/or modify it
     6  * This code is free software; you can redistribute it and/or modify it
     7  * under the terms of the GNU General Public License version 2 only, as
     7  * under the terms of the GNU General Public License version 2 only, as
   933   // each of these paths is exercized by the various jck Call[Static,Nonvirtual,][Void,Int,..]Method[A,V,] tests
   933   // each of these paths is exercized by the various jck Call[Static,Nonvirtual,][Void,Int,..]Method[A,V,] tests
   934 
   934 
   935   inline void get_long()   { _arguments->push_long(va_arg(_ap, jlong)); }
   935   inline void get_long()   { _arguments->push_long(va_arg(_ap, jlong)); }
   936   inline void get_float()  { _arguments->push_float((jfloat)va_arg(_ap, jdouble)); } // float is coerced to double w/ va_arg
   936   inline void get_float()  { _arguments->push_float((jfloat)va_arg(_ap, jdouble)); } // float is coerced to double w/ va_arg
   937   inline void get_double() { _arguments->push_double(va_arg(_ap, jdouble)); }
   937   inline void get_double() { _arguments->push_double(va_arg(_ap, jdouble)); }
   938   inline void get_object() { _arguments->push_jobject(va_arg(_ap, jobject)); }
   938   inline void get_object() { jobject l = va_arg(_ap, jobject);
       
   939                              _arguments->push_oop(Handle((oop *)l, false)); }
   939 
   940 
   940   inline void set_ap(va_list rap) {
   941   inline void set_ap(va_list rap) {
   941     va_copy(_ap, rap);
   942     va_copy(_ap, rap);
   942   }
   943   }
   943 
   944 
  1022   inline void get_int()    { _arguments->push_int((jint)(_ap++)->i); }
  1023   inline void get_int()    { _arguments->push_int((jint)(_ap++)->i); }
  1023 
  1024 
  1024   inline void get_long()   { _arguments->push_long((_ap++)->j);  }
  1025   inline void get_long()   { _arguments->push_long((_ap++)->j);  }
  1025   inline void get_float()  { _arguments->push_float((_ap++)->f); }
  1026   inline void get_float()  { _arguments->push_float((_ap++)->f); }
  1026   inline void get_double() { _arguments->push_double((_ap++)->d);}
  1027   inline void get_double() { _arguments->push_double((_ap++)->d);}
  1027   inline void get_object() { _arguments->push_jobject((_ap++)->l); }
  1028   inline void get_object() { _arguments->push_oop(Handle((oop *)(_ap++)->l, false)); }
  1028 
  1029 
  1029   inline void set_ap(const jvalue *rap) { _ap = rap; }
  1030   inline void set_ap(const jvalue *rap) { _ap = rap; }
  1030 
  1031 
  1031  public:
  1032  public:
  1032   JNI_ArgumentPusherArray(Symbol* signature, const jvalue *rap)
  1033   JNI_ArgumentPusherArray(Symbol* signature, const jvalue *rap)