src/cpu/zero/vm/methodHandles_zero.cpp

Tue, 12 Apr 2011 02:40:23 -0700

author
twisti
date
Tue, 12 Apr 2011 02:40:23 -0700
changeset 2762
4b95bbb36464
parent 2314
f95d63e2154a
child 4237
a3e2f723f2a5
permissions
-rw-r--r--

7035870: JSR 292: Zero support
Summary: This adds support for JSR 292 to Zero.
Reviewed-by: twisti
Contributed-by: Gary Benson <gbenson@redhat.com>

never@1445 1 /*
stefank@2314 2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
twisti@2762 3 * Copyright 2009, 2010, 2011 Red Hat, Inc.
never@1445 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
never@1445 5 *
never@1445 6 * This code is free software; you can redistribute it and/or modify it
never@1445 7 * under the terms of the GNU General Public License version 2 only, as
never@1445 8 * published by the Free Software Foundation.
never@1445 9 *
never@1445 10 * This code is distributed in the hope that it will be useful, but WITHOUT
never@1445 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
never@1445 12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
never@1445 13 * version 2 for more details (a copy is included in the LICENSE file that
never@1445 14 * accompanied this code).
never@1445 15 *
never@1445 16 * You should have received a copy of the GNU General Public License version
never@1445 17 * 2 along with this work; if not, write to the Free Software Foundation,
never@1445 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
never@1445 19 *
trims@1907 20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 21 * or visit www.oracle.com if you need additional information or have any
trims@1907 22 * questions.
never@1445 23 *
never@1445 24 */
never@1445 25
stefank@2314 26 #include "precompiled.hpp"
stefank@2314 27 #include "interpreter/interpreter.hpp"
stefank@2314 28 #include "memory/allocation.inline.hpp"
stefank@2314 29 #include "prims/methodHandles.hpp"
twisti@1781 30
twisti@1865 31 int MethodHandles::adapter_conversion_ops_supported_mask() {
twisti@2762 32 return ((1<<java_lang_invoke_AdapterMethodHandle::OP_RETYPE_ONLY)
twisti@2762 33 |(1<<java_lang_invoke_AdapterMethodHandle::OP_RETYPE_RAW)
twisti@2762 34 |(1<<java_lang_invoke_AdapterMethodHandle::OP_CHECK_CAST)
twisti@2762 35 |(1<<java_lang_invoke_AdapterMethodHandle::OP_PRIM_TO_PRIM)
twisti@2762 36 |(1<<java_lang_invoke_AdapterMethodHandle::OP_REF_TO_PRIM)
twisti@2762 37 |(1<<java_lang_invoke_AdapterMethodHandle::OP_SWAP_ARGS)
twisti@2762 38 |(1<<java_lang_invoke_AdapterMethodHandle::OP_ROT_ARGS)
twisti@2762 39 |(1<<java_lang_invoke_AdapterMethodHandle::OP_DUP_ARGS)
twisti@2762 40 |(1<<java_lang_invoke_AdapterMethodHandle::OP_DROP_ARGS)
twisti@2762 41 //|(1<<java_lang_invoke_AdapterMethodHandle::OP_SPREAD_ARGS) //BUG!
twisti@2762 42 );
twisti@2762 43 // FIXME: MethodHandlesTest gets a crash if we enable OP_SPREAD_ARGS.
twisti@1865 44 }
twisti@1865 45
twisti@1781 46 void MethodHandles::generate_method_handle_stub(MacroAssembler* masm,
twisti@1781 47 MethodHandles::EntryKind ek) {
twisti@2762 48 init_entry(ek, (MethodHandleEntry *) ek);
twisti@1781 49 }

mercurial