annotate graal/com.oracle.graal.api.meta.test/src/com/oracle/graal/api/meta/test/TypeUniverse.java @ 11959:23ccaa863eda

made CodeCacheProvider independent of MetaAccessProvider (GRAAL-511)
author Doug Simon <doug.simon@oracle.com>
date Thu, 10 Oct 2013 16:14:55 +0200
parents 21b8cd853b2b
children 0afe7370260c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9806
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
1 /*
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
4 *
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
8 *
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
13 * accompanied this code).
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
14 *
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
18 *
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
21 * questions.
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
22 */
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
23 package com.oracle.graal.api.meta.test;
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
24
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
25 import java.io.*;
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
26 import java.lang.reflect.*;
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
27 import java.util.*;
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
28 import java.util.Queue;
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
29
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
30 import org.junit.*;
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
31
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
32 import sun.misc.*;
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
33
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
34 import com.oracle.graal.api.meta.*;
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
35 import com.oracle.graal.api.runtime.*;
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
36
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
37 /**
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
38 * Context for type related api.meta tests.
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
39 */
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
40 public class TypeUniverse {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
41
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
42 public final Unsafe unsafe;
11959
23ccaa863eda made CodeCacheProvider independent of MetaAccessProvider (GRAAL-511)
Doug Simon <doug.simon@oracle.com>
parents: 9806
diff changeset
43 public final MetaAccessProvider metaAccess = Graal.getRequiredCapability(MetaAccessProvider.class);
9806
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
44 public final Collection<Class<?>> classes = new HashSet<>();
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
45 public final Map<Class<?>, Class<?>> arrayClasses = new HashMap<>();
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
46 public final List<Constant> constants = new ArrayList<>();
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
47
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
48 public TypeUniverse() {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
49 Unsafe theUnsafe = null;
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
50 try {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
51 theUnsafe = Unsafe.getUnsafe();
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
52 } catch (Exception e) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
53 try {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
54 Field theUnsafeField = Unsafe.class.getDeclaredField("theUnsafe");
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
55 theUnsafeField.setAccessible(true);
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
56 theUnsafe = (Unsafe) theUnsafeField.get(null);
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
57 } catch (Exception e1) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
58 throw (InternalError) new InternalError("unable to initialize unsafe").initCause(e1);
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
59 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
60 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
61 unsafe = theUnsafe;
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
62
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
63 Class[] initialClasses = {void.class, boolean.class, byte.class, short.class, char.class, int.class, float.class, long.class, double.class, Object.class, Class.class, ClassLoader.class,
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
64 String.class, Serializable.class, Cloneable.class, Test.class, TestMetaAccessProvider.class, List.class, Collection.class, Map.class, Queue.class, HashMap.class,
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
65 LinkedHashMap.class, IdentityHashMap.class, AbstractCollection.class, AbstractList.class, ArrayList.class};
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
66 for (Class c : initialClasses) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
67 addClass(c);
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
68 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
69 for (Field f : Constant.class.getDeclaredFields()) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
70 int mods = f.getModifiers();
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
71 if (f.getType() == Constant.class && Modifier.isPublic(mods) && Modifier.isStatic(mods) && Modifier.isFinal(mods)) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
72 try {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
73 Constant c = (Constant) f.get(null);
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
74 if (c != null) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
75 constants.add(c);
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
76 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
77 } catch (Exception e) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
78 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
79 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
80 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
81 for (Class c : classes) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
82 if (c != void.class && !c.isArray()) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
83 constants.add(Constant.forObject(Array.newInstance(c, 42)));
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
84 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
85 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
86 constants.add(Constant.forObject(new ArrayList<>()));
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
87 constants.add(Constant.forObject(new IdentityHashMap<>()));
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
88 constants.add(Constant.forObject(new LinkedHashMap<>()));
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
89 constants.add(Constant.forObject(new TreeMap<>()));
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
90 constants.add(Constant.forObject(new ArrayDeque<>()));
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
91 constants.add(Constant.forObject(new LinkedList<>()));
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
92 constants.add(Constant.forObject("a string"));
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
93 constants.add(Constant.forObject(42));
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
94 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
95
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
96 public synchronized Class<?> getArrayClass(Class componentType) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
97 Class<?> arrayClass = arrayClasses.get(componentType);
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
98 if (arrayClass == null) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
99 arrayClass = Array.newInstance(componentType, 0).getClass();
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
100 arrayClasses.put(componentType, arrayClass);
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
101 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
102 return arrayClass;
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
103 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
104
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
105 public static int dimensions(Class c) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
106 if (c.getComponentType() != null) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
107 return 1 + dimensions(c.getComponentType());
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
108 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
109 return 0;
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
110 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
111
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
112 private void addClass(Class c) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
113 if (classes.add(c)) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
114 if (c.getSuperclass() != null) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
115 addClass(c.getSuperclass());
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
116 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
117 for (Class sc : c.getInterfaces()) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
118 addClass(sc);
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
119 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
120 for (Class dc : c.getDeclaredClasses()) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
121 addClass(dc);
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
122 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
123 for (Method m : c.getDeclaredMethods()) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
124 addClass(m.getReturnType());
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
125 for (Class p : m.getParameterTypes()) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
126 addClass(p);
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
127 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
128 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
129
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
130 if (c != void.class && dimensions(c) < 2) {
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
131 Class<?> arrayClass = Array.newInstance(c, 0).getClass();
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
132 arrayClasses.put(c, arrayClass);
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
133 addClass(arrayClass);
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
134 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
135 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
136 }
21b8cd853b2b cleaned up api.meta tests (GRAAL-59)
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
137 }