Mercurial > hg > truffle
comparison graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/XirGenerator.java @ 5775:2c088af17e59
Removed left over Ri* prefixed identifiers
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 05 Jul 2012 21:47:16 +0200 |
parents | graal/com.oracle.max.cri/src/com/oracle/max/cri/xir/RiXirGenerator.java@a1db0ea58b53 |
children |
comparison
equal
deleted
inserted
replaced
5774:a1db0ea58b53 | 5775:2c088af17e59 |
---|---|
1 /* | |
2 * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. | |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
20 * or visit www.oracle.com if you need additional information or have any | |
21 * questions. | |
22 */ | |
23 package com.oracle.max.cri.xir; | |
24 | |
25 import com.oracle.graal.api.meta.*; | |
26 import com.oracle.graal.api.meta.JavaType.*; | |
27 | |
28 /** | |
29 * Represents the interface through which the compiler requests the XIR for a given bytecode from the runtime system. | |
30 */ | |
31 public interface XirGenerator { | |
32 | |
33 XirSnippet genInvokeInterface(XirSite site, XirArgument receiver, JavaMethod method); | |
34 | |
35 XirSnippet genInvokeVirtual(XirSite site, XirArgument receiver, JavaMethod method, boolean megamorph); | |
36 | |
37 XirSnippet genInvokeSpecial(XirSite site, XirArgument receiver, JavaMethod method); | |
38 | |
39 XirSnippet genInvokeStatic(XirSite site, JavaMethod method); | |
40 | |
41 XirSnippet genMonitorEnter(XirSite site, XirArgument receiver, XirArgument lockAddress); | |
42 | |
43 XirSnippet genMonitorExit(XirSite site, XirArgument receiver, XirArgument lockAddress); | |
44 | |
45 XirSnippet genNewInstance(XirSite site, JavaType type); | |
46 | |
47 XirSnippet genNewArray(XirSite site, XirArgument length, Kind elementKind, JavaType componentType, JavaType arrayType); | |
48 | |
49 XirSnippet genNewMultiArray(XirSite site, XirArgument[] lengths, JavaType type); | |
50 | |
51 XirSnippet genCheckCast(XirSite site, XirArgument receiver, XirArgument hub, ResolvedJavaType type, JavaTypeProfile profile); | |
52 | |
53 XirSnippet genInstanceOf(XirSite site, XirArgument receiver, XirArgument hub, ResolvedJavaType type, JavaTypeProfile profile); | |
54 | |
55 XirSnippet genMaterializeInstanceOf(XirSite site, XirArgument receiver, XirArgument hub, XirArgument trueValue, XirArgument falseValue, ResolvedJavaType type, JavaTypeProfile profile); | |
56 | |
57 /** | |
58 * Generates code that checks that the {@linkplain Representation#ObjectHub hub} of | |
59 * an object is identical to a given hub constant. In pseudo code: | |
60 * <pre> | |
61 * if (object.getHub() != hub) { | |
62 * jump(falseSuccessor) | |
63 * } | |
64 * </pre> | |
65 * This snippet should only be used when the object is guaranteed not to be null. | |
66 */ | |
67 XirSnippet genTypeBranch(XirSite site, XirArgument thisHub, XirArgument otherHub, JavaType type); | |
68 | |
69 /** | |
70 * Initializes the XIR generator for the given XIR assembler. | |
71 * | |
72 * @param asm the XIR assembler | |
73 */ | |
74 void initialize(XirAssembler asm); | |
75 | |
76 } |