annotate jvmci/com.oracle.jvmci.runtime.test/src/com/oracle/jvmci/runtime/test/FieldUniverse.java @ 21916:3df76a0300f3

jvmci.make remove generated source from search path; export compilers into a different directory when jvmci is disabled: jre/lib/<arch>/(server|client)-nojvmci/
author Stefan Anzinger <stefan.anzinger@oracle.com>
date Thu, 11 Jun 2015 11:07:28 +0200
parents 395ac43a8578
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13818
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
1 /*
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
4 *
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
8 *
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
13 * accompanied this code).
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
14 *
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
18 *
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
21 * questions.
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
22 */
21663
381ab4105afe moved com.oracle.graal.java.test to com.oracle.jvmci.runtime.test
Doug Simon <doug.simon@oracle.com>
parents: 21556
diff changeset
23 package com.oracle.jvmci.runtime.test;
13818
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
24
21556
48c1ebd24120 renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21555
diff changeset
25 import com.oracle.jvmci.meta.ResolvedJavaField;
21663
381ab4105afe moved com.oracle.graal.java.test to com.oracle.jvmci.runtime.test
Doug Simon <doug.simon@oracle.com>
parents: 21556
diff changeset
26
13818
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
27 import java.lang.reflect.*;
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
28 import java.util.*;
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
29
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
30 /**
21556
48c1ebd24120 renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21555
diff changeset
31 * Context for field related tests.
13818
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
32 */
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
33 public class FieldUniverse extends TypeUniverse {
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
34
21663
381ab4105afe moved com.oracle.graal.java.test to com.oracle.jvmci.runtime.test
Doug Simon <doug.simon@oracle.com>
parents: 21556
diff changeset
35 public static final Map<Field, ResolvedJavaField> fields = new HashMap<>();
13818
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
36
21663
381ab4105afe moved com.oracle.graal.java.test to com.oracle.jvmci.runtime.test
Doug Simon <doug.simon@oracle.com>
parents: 21556
diff changeset
37 {
15040
288c23143d47 Fix most raw type references.
Josef Eisl <josef.eisl@jku.at>
parents: 13818
diff changeset
38 for (Class<?> c : classes) {
13818
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
39 for (Field f : c.getDeclaredFields()) {
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
40 ResolvedJavaField field = metaAccess.lookupJavaField(f);
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
41 fields.put(f, field);
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
42 }
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
43 }
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
44 }
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
45 }