hotspot/src/share/vm/runtime/javaCalls.hpp
author trims
Tue, 05 Apr 2011 14:12:31 -0700
changeset 8921 14bfe81f2a9d
parent 8107 78e5bd944384
child 10565 dc90c239f4ec
permissions -rw-r--r--
7010070: Update all 2010 Oracle-changed OpenJDK files to have the proper copyright dates - second pass Summary: Update the copyright to be 2010 on all changed files in OpenJDK Reviewed-by: ohair
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
8921
14bfe81f2a9d 7010070: Update all 2010 Oracle-changed OpenJDK files to have the proper copyright dates - second pass
trims
parents: 8107
diff changeset
     2
 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5419
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5419
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5419
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    25
#ifndef SHARE_VM_RUNTIME_JAVACALLS_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    26
#define SHARE_VM_RUNTIME_JAVACALLS_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    27
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    28
#include "memory/allocation.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    29
#include "oops/methodOop.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    30
#include "runtime/handles.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    31
#include "runtime/javaFrameAnchor.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    32
#include "runtime/vmThread.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    33
#ifdef TARGET_ARCH_x86
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    34
# include "jniTypes_x86.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    35
#endif
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    36
#ifdef TARGET_ARCH_sparc
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    37
# include "jniTypes_sparc.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    38
#endif
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    39
#ifdef TARGET_ARCH_zero
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    40
# include "jniTypes_zero.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    41
#endif
8107
78e5bd944384 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 8076
diff changeset
    42
#ifdef TARGET_ARCH_arm
78e5bd944384 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 8076
diff changeset
    43
# include "jniTypes_arm.hpp"
78e5bd944384 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 8076
diff changeset
    44
#endif
78e5bd944384 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 8076
diff changeset
    45
#ifdef TARGET_ARCH_ppc
78e5bd944384 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 8076
diff changeset
    46
# include "jniTypes_ppc.hpp"
78e5bd944384 7016023: Enable building ARM and PPC from src/closed repository
bobv
parents: 8076
diff changeset
    47
#endif
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    48
#ifdef TARGET_OS_FAMILY_linux
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    49
# include "thread_linux.inline.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    50
#endif
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    51
#ifdef TARGET_OS_FAMILY_solaris
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    52
# include "thread_solaris.inline.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    53
#endif
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    54
#ifdef TARGET_OS_FAMILY_windows
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    55
# include "thread_windows.inline.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    56
#endif
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    57
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
// A JavaCallWrapper is constructed before each JavaCall and destructed after the call.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
// Its purpose is to allocate/deallocate a new handle block and to save/restore the last
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
// Java fp/sp. A pointer to the JavaCallWrapper is stored on the stack.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
class JavaCallWrapper: StackObj {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
  friend class VMStructs;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
 private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
  JavaThread*      _thread;                 // the thread to which this call belongs
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
  JNIHandleBlock*  _handles;                // the saved handle block
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
  methodOop        _callee_method;          // to be able to collect arguments if entry frame is top frame
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
  oop              _receiver;               // the receiver of the call (if a non-static call)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
  JavaFrameAnchor  _anchor;                 // last thread anchor state that we must restore
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
  JavaValue*       _result;                 // result value
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
  // Construction/destruction
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
   JavaCallWrapper(methodHandle callee_method, Handle receiver, JavaValue* result, TRAPS);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
  ~JavaCallWrapper();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
  // Accessors
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
  JavaThread*      thread() const           { return _thread; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
  JNIHandleBlock*  handles() const          { return _handles; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
  JavaFrameAnchor* anchor(void)             { return &_anchor; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
  JavaValue*       result() const           { return _result; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
  // GC support
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
  methodOop        callee_method()          { return _callee_method; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
  oop              receiver()               { return _receiver; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
  void             oops_do(OopClosure* f);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
// Encapsulates arguments to a JavaCall (faster, safer, and more convenient than using var-args)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
class JavaCallArguments : public StackObj {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
 private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
  enum Constants {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
   _default_size = 8    // Must be at least # of arguments in JavaCalls methods
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
  };
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
  intptr_t    _value_buffer [_default_size + 1];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
  bool        _is_oop_buffer[_default_size + 1];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
  intptr_t*   _value;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
  bool*       _is_oop;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
  int         _size;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
  int         _max_size;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
  bool        _start_at_zero;      // Support late setting of receiver
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
  void initialize() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
    // Starts at first element to support set_receiver.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
    _value    = &_value_buffer[1];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
    _is_oop   = &_is_oop_buffer[1];
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
    _max_size = _default_size;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
    _size = 0;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
    _start_at_zero = false;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
  JavaCallArguments() { initialize(); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
  JavaCallArguments(Handle receiver) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
    initialize();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
    push_oop(receiver);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
  JavaCallArguments(int max_size) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
    if (max_size > _default_size) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
      _value  = NEW_RESOURCE_ARRAY(intptr_t, max_size + 1);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
      _is_oop = NEW_RESOURCE_ARRAY(bool, max_size + 1);
5419
f2e8cc8c12ea 6943304: remove tagged stack interpreter
twisti
parents: 1623
diff changeset
   132
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
      // Reserve room for potential receiver in value and is_oop
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
      _value++; _is_oop++;
5419
f2e8cc8c12ea 6943304: remove tagged stack interpreter
twisti
parents: 1623
diff changeset
   135
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
      _max_size = max_size;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
      _size = 0;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
      _start_at_zero = false;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
    } else {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
      initialize();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
  inline void push_oop(Handle h)    { _is_oop[_size] = true;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
                               JNITypes::put_obj((oop)h.raw_value(), _value, _size); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
  inline void push_int(int i)       { _is_oop[_size] = false;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
                               JNITypes::put_int(i, _value, _size); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
  inline void push_double(double d) { _is_oop[_size] = false; _is_oop[_size + 1] = false;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
                               JNITypes::put_double(d, _value, _size); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
  inline void push_long(jlong l)    { _is_oop[_size] = false; _is_oop[_size + 1] = false;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
                               JNITypes::put_long(l, _value, _size); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
  inline void push_float(float f)   { _is_oop[_size] = false;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
                               JNITypes::put_float(f, _value, _size); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
  // receiver
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
  Handle receiver() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
    assert(_size > 0, "must at least be one argument");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
    assert(_is_oop[0], "first argument must be an oop");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
    assert(_value[0] != 0, "receiver must be not-null");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
    return Handle((oop*)_value[0], false);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
  void set_receiver(Handle h) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
    assert(_start_at_zero == false, "can only be called once");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
    _start_at_zero = true;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
    _is_oop--;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
    _value--;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
    _size++;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
    _is_oop[0] = true;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
    _value[0] = (intptr_t)h.raw_value();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
  // Converts all Handles to oops, and returns a reference to parameter vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
  intptr_t* parameters() ;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
  int   size_of_parameters() const { return _size; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
  // Verify that pushed arguments fits a given method
1618
2d86b9b84aa5 6739363: Xcheck jni doesn't check native function arguments
poonam
parents: 1
diff changeset
   182
  void verify(methodHandle method, BasicType return_type, Thread *thread);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
// All calls to Java have to go via JavaCalls. Sets up the stack frame
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
// and makes sure that the last_Java_frame pointers are chained correctly.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
//
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
class JavaCalls: AllStatic {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
  static void call_helper(JavaValue* result, methodHandle* method, JavaCallArguments* args, TRAPS);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
  // Optimized Constuctor call
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
  static void call_default_constructor(JavaThread* thread, methodHandle method, Handle receiver, TRAPS);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
  // call_special
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
  // ------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
  // The receiver must be first oop in argument list
8076
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   198
  static void call_special(JavaValue* result, KlassHandle klass, Symbol* name, Symbol* signature, JavaCallArguments* args, TRAPS);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
8076
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   200
  static void call_special(JavaValue* result, Handle receiver, KlassHandle klass, Symbol* name, Symbol* signature, TRAPS); // No args
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   201
  static void call_special(JavaValue* result, Handle receiver, KlassHandle klass, Symbol* name, Symbol* signature, Handle arg1, TRAPS);
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   202
  static void call_special(JavaValue* result, Handle receiver, KlassHandle klass, Symbol* name, Symbol* signature, Handle arg1, Handle arg2, TRAPS);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
  // virtual call
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
  // ------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
  // The receiver must be first oop in argument list
8076
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   208
  static void call_virtual(JavaValue* result, KlassHandle spec_klass, Symbol* name, Symbol* signature, JavaCallArguments* args, TRAPS);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
8076
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   210
  static void call_virtual(JavaValue* result, Handle receiver, KlassHandle spec_klass, Symbol* name, Symbol* signature, TRAPS); // No args
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   211
  static void call_virtual(JavaValue* result, Handle receiver, KlassHandle spec_klass, Symbol* name, Symbol* signature, Handle arg1, TRAPS);
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   212
  static void call_virtual(JavaValue* result, Handle receiver, KlassHandle spec_klass, Symbol* name, Symbol* signature, Handle arg1, Handle arg2, TRAPS);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
  // Static call
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
  // -----------
8076
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   216
  static void call_static(JavaValue* result, KlassHandle klass, Symbol* name, Symbol* signature, JavaCallArguments* args, TRAPS);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
8076
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   218
  static void call_static(JavaValue* result, KlassHandle klass, Symbol* name, Symbol* signature, TRAPS);
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   219
  static void call_static(JavaValue* result, KlassHandle klass, Symbol* name, Symbol* signature, Handle arg1, TRAPS);
96d498ec7ae1 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 7397
diff changeset
   220
  static void call_static(JavaValue* result, KlassHandle klass, Symbol* name, Symbol* signature, Handle arg1, Handle arg2, TRAPS);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
  // Low-level interface
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
  static void call(JavaValue* result, methodHandle method, JavaCallArguments* args, TRAPS);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
};
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   225
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   226
#endif // SHARE_VM_RUNTIME_JAVACALLS_HPP