annotate src/share/vm/graal/graalRuntime.cpp @ 5523:861f8d5a5153

Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Fri, 08 Jun 2012 16:57:07 +0200
parents
children 77d302416830
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5523
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
1 /*
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
4 *
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
8 *
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
13 * accompanied this code).
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
14 *
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
18 *
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
21 * questions.
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
22 */
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
23
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
24 #include "precompiled.hpp"
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
25
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
26 // JVM_InitializeGraalRuntime
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
27 JVM_ENTRY(jobject, JVM_InitializeGraalRuntime(JNIEnv *env, jclass graalclass))
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
28 ThreadToNativeFromVM ttnfv(thread);
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
29 jclass klass = env->FindClass("com/oracle/graal/hotspot/HotSpotGraalRuntime");
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
30 guarantee(klass != NULL, "Could not find class com.oracle.graal.hotspot.HotSpotGraalRuntime");
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
31 return env->AllocObject(klass);
861f8d5a5153 Added code to resolve GraalRuntime into HotSpot. Added graal.api.test project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
32 JVM_END