/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "interpreter/interpreter.hpp"
#include "interpreter/interpreterRuntime.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/universe.inline.hpp"
#include "oops/methodOop.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/icache.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/signature.hpp"
// Implementation of SignatureHandlerGenerator
#ifdef _WIN64
switch (_num_args) {
case 0:
_num_args++;
break;
case 1:
_num_args++;
break;
case 2:
_num_args++;
break;
default:
break;
}
#else
switch (_num_int_args) {
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
break;
default:
break;
}
#endif
}
#ifdef _WIN64
switch (_num_args) {
case 0:
_num_args++;
break;
case 1:
_num_args++;
break;
case 2:
_num_args++;
break;
case 3:
default:
break;
}
#else
switch (_num_int_args) {
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
break;
default:
break;
}
#endif
}
#ifdef _WIN64
} else {
}
#else
} else {
}
#endif
}
#ifdef _WIN64
} else {
}
#else
} else {
}
#endif
}
#ifdef _WIN64
switch (_num_args) {
case 0:
_num_args++;
break;
case 1:
_num_args++;
break;
case 2:
_num_args++;
break;
default:
break;
}
#else
switch (_num_int_args) {
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
break;
default:
break;
}
#endif
}
// generate code to handle arguments
// return result handler
}
// Implementation of SignatureHandlerLibrary
#ifdef _WIN64
class SlowSignatureHandler
: public NativeSignatureIterator {
private:
unsigned int _num_args;
virtual void pass_int()
{
_num_args++;
} else {
}
}
virtual void pass_long()
{
_num_args++;
} else {
}
}
virtual void pass_object()
{
_num_args++;
} else {
}
}
virtual void pass_float()
{
_num_args++;
} else {
}
}
virtual void pass_double()
{
_num_args++;
} else {
}
}
public:
{
*(int*) _fp_identifiers = 0;
}
};
#else
class SlowSignatureHandler
: public NativeSignatureIterator {
private:
unsigned int _num_int_args;
unsigned int _num_fp_args;
virtual void pass_int()
{
} else {
}
}
virtual void pass_long()
{
} else {
}
}
virtual void pass_object()
{
} else {
}
}
virtual void pass_float()
{
_num_fp_args++;
} else {
}
}
virtual void pass_double()
{
_num_fp_args++;
} else {
}
}
public:
{
*(int*) _fp_identifiers = 0;
_num_fp_args = 0;
}
};
#endif
// handle arguments
// return result handler