Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiCallingConvention.java @ 5506:56860d3f9f39
More refactorings and renamings in preparation of ci/ri split.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Thu, 07 Jun 2012 18:12:01 +0200 |
parents | aaac4894175c |
children | dc71b06d09f8 |
comparison
equal
deleted
inserted
replaced
5505:28af6dff047f | 5506:56860d3f9f39 |
---|---|
32 */ | 32 */ |
33 public class CiCallingConvention { | 33 public class CiCallingConvention { |
34 | 34 |
35 /** | 35 /** |
36 * Constants denoting the type of a call for which a calling convention is | 36 * Constants denoting the type of a call for which a calling convention is |
37 * {@linkplain RiRegisterConfig#getCallingConvention(Type, CiKind[], CiTarget, boolean) requested}. | 37 * {@linkplain CiRegisterConfig#getCallingConvention(Type, CiKind[], CiTarget, boolean) requested}. |
38 */ | 38 */ |
39 public enum Type { | 39 public enum Type { |
40 /** | 40 /** |
41 * A request for the outgoing argument locations at a call site to Java code. | 41 * A request for the outgoing argument locations at a call site to Java code. |
42 */ | 42 */ |
76 public final int stackSize; | 76 public final int stackSize; |
77 | 77 |
78 /** | 78 /** |
79 * The locations in which the arguments are placed. This array ordered by argument index. | 79 * The locations in which the arguments are placed. This array ordered by argument index. |
80 */ | 80 */ |
81 public final CiValue[] locations; | 81 public final RiValue[] locations; |
82 | 82 |
83 public CiCallingConvention(CiValue[] locations, int stackSize) { | 83 public CiCallingConvention(RiValue[] locations, int stackSize) { |
84 this.locations = locations; | 84 this.locations = locations; |
85 this.stackSize = stackSize; | 85 this.stackSize = stackSize; |
86 assert verify(); | 86 assert verify(); |
87 } | 87 } |
88 | 88 |
89 @Override | 89 @Override |
90 public String toString() { | 90 public String toString() { |
91 StringBuilder result = new StringBuilder(); | 91 StringBuilder result = new StringBuilder(); |
92 result.append("CallingConvention["); | 92 result.append("CallingConvention["); |
93 for (CiValue op : locations) { | 93 for (RiValue op : locations) { |
94 result.append(op.toString()).append(" "); | 94 result.append(op.toString()).append(" "); |
95 } | 95 } |
96 result.append("]"); | 96 result.append("]"); |
97 return result.toString(); | 97 return result.toString(); |
98 } | 98 } |
99 | 99 |
100 private boolean verify() { | 100 private boolean verify() { |
101 for (int i = 0; i < locations.length; i++) { | 101 for (int i = 0; i < locations.length; i++) { |
102 CiValue location = locations[i]; | 102 RiValue location = locations[i]; |
103 assert isStackSlot(location) || isRegister(location); | 103 assert isStackSlot(location) || isRegister(location); |
104 } | 104 } |
105 return true; | 105 return true; |
106 } | 106 } |
107 } | 107 } |