Mercurial > hg > truffle
annotate graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/VMExitsNative.java @ 2903:eb3a82946429
Measure nodes created and nodes deleted for nodes. New option -G:+Meter.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 08 Jun 2011 17:26:22 +0200 |
parents | d577d07cedec |
children | b78b4ae0757c |
rev | line source |
---|---|
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
2502
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
4 * |
2502
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
7 * published by the Free Software Foundation. |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
8 * |
2502
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
13 * accompanied this code). |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
14 * |
2502
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
18 * |
2502
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
3e3e8bd12730
Copyright rebranding. Update checkstyle file.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
2501
diff
changeset
|
21 * questions. |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
22 */ |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
23 |
2874
d90bf514d647
Renamed packages.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2872
diff
changeset
|
24 package com.oracle.max.graal.runtime; |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
25 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
26 import java.io.*; |
2901
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
27 import java.lang.management.*; |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
28 import java.util.*; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
29 |
2874
d90bf514d647
Renamed packages.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2872
diff
changeset
|
30 import com.oracle.max.graal.compiler.*; |
d90bf514d647
Renamed packages.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2872
diff
changeset
|
31 import com.oracle.max.graal.compiler.debug.*; |
d90bf514d647
Renamed packages.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2872
diff
changeset
|
32 import com.oracle.max.graal.runtime.logging.*; |
d90bf514d647
Renamed packages.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2872
diff
changeset
|
33 import com.oracle.max.graal.runtime.server.*; |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
34 import com.sun.cri.ci.*; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
35 import com.sun.cri.ri.*; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
36 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
37 /** |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
38 * Exits from the HotSpot VM into Java code. |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
39 */ |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
40 public class VMExitsNative implements VMExits, Remote { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
41 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
42 public static final boolean LogCompiledMethods = false; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
43 public static boolean compileMethods = true; |
2901
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
44 private static boolean PrintGCStats = false; |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
45 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
46 private final Compiler compiler; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
47 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
48 public final HotSpotTypePrimitive typeBoolean; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
49 public final HotSpotTypePrimitive typeChar; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
50 public final HotSpotTypePrimitive typeFloat; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
51 public final HotSpotTypePrimitive typeDouble; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
52 public final HotSpotTypePrimitive typeByte; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
53 public final HotSpotTypePrimitive typeShort; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
54 public final HotSpotTypePrimitive typeInt; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
55 public final HotSpotTypePrimitive typeLong; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
56 public final HotSpotTypePrimitive typeVoid; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
57 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
58 public VMExitsNative(Compiler compiler) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
59 this.compiler = compiler; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
60 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
61 typeBoolean = new HotSpotTypePrimitive(compiler, CiKind.Boolean); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
62 typeChar = new HotSpotTypePrimitive(compiler, CiKind.Char); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
63 typeFloat = new HotSpotTypePrimitive(compiler, CiKind.Float); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
64 typeDouble = new HotSpotTypePrimitive(compiler, CiKind.Double); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
65 typeByte = new HotSpotTypePrimitive(compiler, CiKind.Byte); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
66 typeShort = new HotSpotTypePrimitive(compiler, CiKind.Short); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
67 typeInt = new HotSpotTypePrimitive(compiler, CiKind.Int); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
68 typeLong = new HotSpotTypePrimitive(compiler, CiKind.Long); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
69 typeVoid = new HotSpotTypePrimitive(compiler, CiKind.Void); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
70 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
71 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
72 private static Set<String> compiledMethods = new HashSet<String>(); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
73 |
2901
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
74 public void shutdownCompiler() { |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
75 compileMethods = false; |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
76 |
2903
eb3a82946429
Measure nodes created and nodes deleted for nodes. New option -G:+Meter.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2901
diff
changeset
|
77 if (GraalOptions.Meter) { |
2901
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
78 GraalMetrics.print(); |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
79 } |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
80 if (GraalOptions.Time) { |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
81 GraalTimers.print(); |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
82 } |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
83 if (PrintGCStats) { |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
84 printGCStats(); |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
85 } |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
86 } |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
87 |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
88 |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
89 public static void printGCStats() { |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
90 long totalGarbageCollections = 0; |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
91 long garbageCollectionTime = 0; |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
92 |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
93 for (GarbageCollectorMXBean gc : ManagementFactory.getGarbageCollectorMXBeans()) { |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
94 long count = gc.getCollectionCount(); |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
95 if (count >= 0) { |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
96 totalGarbageCollections += count; |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
97 } |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
98 |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
99 long time = gc.getCollectionTime(); |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
100 if (time >= 0) { |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
101 garbageCollectionTime += time; |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
102 } |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
103 } |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
104 |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
105 System.out.println("Total Garbage Collections: " + totalGarbageCollections); |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
106 System.out.println("Total Garbage Collection Time (ms): " + garbageCollectionTime); |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
107 } |
d577d07cedec
Added time measurement for phases.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2888
diff
changeset
|
108 |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
109 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
110 public void compileMethod(long methodVmId, String name, int entryBCI) throws Throwable { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
111 if (!compileMethods) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
112 return; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
113 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
114 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
115 try { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
116 HotSpotMethodResolved riMethod = new HotSpotMethodResolved(compiler, methodVmId, name); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
117 CiResult result = compiler.getCompiler().compileMethod(riMethod, -1, null, null); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
118 if (LogCompiledMethods) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
119 String qualifiedName = CiUtil.toJavaName(riMethod.holder()) + "::" + riMethod.name(); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
120 compiledMethods.add(qualifiedName); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
121 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
122 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
123 if (result.bailout() != null) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
124 Throwable cause = result.bailout().getCause(); |
2888
224412c24426
Changed C1X=>Graal and c1x=>graal in Java code.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2874
diff
changeset
|
125 if (!GraalOptions.QuietBailout) { |
2568
95a9b8906b09
Add QuietBailout option to be able to mute the bailouts generated by JSRs in dacapo
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2509
diff
changeset
|
126 StringWriter out = new StringWriter(); |
95a9b8906b09
Add QuietBailout option to be able to mute the bailouts generated by JSRs in dacapo
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2509
diff
changeset
|
127 result.bailout().printStackTrace(new PrintWriter(out)); |
95a9b8906b09
Add QuietBailout option to be able to mute the bailouts generated by JSRs in dacapo
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2509
diff
changeset
|
128 TTY.println("Bailout:\n" + out.toString()); |
95a9b8906b09
Add QuietBailout option to be able to mute the bailouts generated by JSRs in dacapo
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2509
diff
changeset
|
129 if (cause != null) { |
95a9b8906b09
Add QuietBailout option to be able to mute the bailouts generated by JSRs in dacapo
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2509
diff
changeset
|
130 Logger.info("Trace for cause: "); |
95a9b8906b09
Add QuietBailout option to be able to mute the bailouts generated by JSRs in dacapo
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2509
diff
changeset
|
131 for (StackTraceElement e : cause.getStackTrace()) { |
95a9b8906b09
Add QuietBailout option to be able to mute the bailouts generated by JSRs in dacapo
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2509
diff
changeset
|
132 String current = e.getClassName() + "::" + e.getMethodName(); |
95a9b8906b09
Add QuietBailout option to be able to mute the bailouts generated by JSRs in dacapo
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2509
diff
changeset
|
133 String type = ""; |
95a9b8906b09
Add QuietBailout option to be able to mute the bailouts generated by JSRs in dacapo
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2509
diff
changeset
|
134 if (compiledMethods.contains(current)) { |
95a9b8906b09
Add QuietBailout option to be able to mute the bailouts generated by JSRs in dacapo
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2509
diff
changeset
|
135 type = "compiled"; |
95a9b8906b09
Add QuietBailout option to be able to mute the bailouts generated by JSRs in dacapo
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2509
diff
changeset
|
136 } |
95a9b8906b09
Add QuietBailout option to be able to mute the bailouts generated by JSRs in dacapo
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2509
diff
changeset
|
137 Logger.info(String.format("%-10s %3d %s", type, e.getLineNumber(), current)); |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
138 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
139 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
140 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
141 String s = result.bailout().getMessage(); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
142 if (cause != null) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
143 s = cause.getMessage(); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
144 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
145 compiler.getVMEntries().recordBailout(s); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
146 } else { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
147 HotSpotTargetMethod.installMethod(compiler, riMethod, result.targetMethod()); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
148 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
149 } catch (Throwable t) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
150 StringWriter out = new StringWriter(); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
151 t.printStackTrace(new PrintWriter(out)); |
2865
7a4e6e11877f
Subclasses for Shift
Gilles Duboscq <gilles.duboscq@oracle.com>
parents:
2592
diff
changeset
|
152 TTY.println("Compilation interrupted: (" + name + ")\n" + out.toString()); |
2501
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
153 throw t; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
154 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
155 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
156 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
157 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
158 public RiMethod createRiMethodResolved(long vmId, String name) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
159 return new HotSpotMethodResolved(compiler, vmId, name); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
160 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
161 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
162 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
163 public RiMethod createRiMethodUnresolved(String name, String signature, RiType holder) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
164 return new HotSpotMethodUnresolved(compiler, name, signature, holder); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
165 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
166 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
167 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
168 public RiSignature createRiSignature(String signature) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
169 return new HotSpotSignature(compiler, signature); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
170 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
171 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
172 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
173 public RiField createRiField(RiType holder, String name, RiType type, int offset, int flags) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
174 if (offset != -1) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
175 HotSpotTypeResolved resolved = (HotSpotTypeResolved) holder; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
176 return resolved.createRiField(name, type, offset, flags); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
177 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
178 return new HotSpotField(compiler, holder, name, type, offset, flags); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
179 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
180 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
181 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
182 public RiType createRiType(long vmId, String name) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
183 throw new RuntimeException("not implemented"); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
184 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
185 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
186 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
187 public RiType createRiTypePrimitive(int basicType) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
188 switch (basicType) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
189 case 4: |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
190 return typeBoolean; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
191 case 5: |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
192 return typeChar; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
193 case 6: |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
194 return typeFloat; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
195 case 7: |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
196 return typeDouble; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
197 case 8: |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
198 return typeByte; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
199 case 9: |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
200 return typeShort; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
201 case 10: |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
202 return typeInt; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
203 case 11: |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
204 return typeLong; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
205 case 14: |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
206 return typeVoid; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
207 default: |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
208 throw new IllegalArgumentException("Unknown basic type: " + basicType); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
209 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
210 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
211 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
212 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
213 public RiType createRiTypeUnresolved(String name) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
214 return new HotSpotTypeUnresolved(compiler, name); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
215 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
216 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
217 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
218 public RiConstantPool createRiConstantPool(long vmId) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
219 return new HotSpotConstantPool(compiler, vmId); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
220 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
221 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
222 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
223 public CiConstant createCiConstant(CiKind kind, long value) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
224 if (kind == CiKind.Long) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
225 return CiConstant.forLong(value); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
226 } else if (kind == CiKind.Int) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
227 return CiConstant.forInt((int) value); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
228 } else if (kind == CiKind.Short) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
229 return CiConstant.forShort((short) value); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
230 } else if (kind == CiKind.Char) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
231 return CiConstant.forChar((char) value); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
232 } else if (kind == CiKind.Byte) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
233 return CiConstant.forByte((byte) value); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
234 } else if (kind == CiKind.Boolean) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
235 return (value == 0) ? CiConstant.FALSE : CiConstant.TRUE; |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
236 } else { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
237 throw new IllegalArgumentException(); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
238 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
239 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
240 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
241 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
242 public CiConstant createCiConstantFloat(float value) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
243 return CiConstant.forFloat(value); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
244 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
245 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
246 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
247 public CiConstant createCiConstantDouble(double value) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
248 return CiConstant.forDouble(value); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
249 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
250 |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
251 @Override |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
252 public CiConstant createCiConstantObject(Object object) { |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
253 return CiConstant.forObject(object); |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
254 } |
6594e6d8bfe7
Rebranding to com.oracle.graal
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
255 } |