Mercurial > hg > truffle
comparison c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.java @ 2284:569d3fe7d65c
non-static VMEntries and VMExits, CompilationServer simplifications
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Thu, 07 Apr 2011 15:32:25 +0200 |
parents | 360497545e85 |
children | 6190d20bd6d6 |
comparison
equal
deleted
inserted
replaced
2282:0309d394eb5f | 2284:569d3fe7d65c |
---|---|
40 public class HotSpotRuntime implements RiRuntime { | 40 public class HotSpotRuntime implements RiRuntime { |
41 | 41 |
42 final HotSpotVMConfig config; | 42 final HotSpotVMConfig config; |
43 final HotSpotRegisterConfig regConfig; | 43 final HotSpotRegisterConfig regConfig; |
44 final HotSpotRegisterConfig globalStubRegConfig; | 44 final HotSpotRegisterConfig globalStubRegConfig; |
45 | 45 private final Compiler compiler; |
46 | 46 |
47 public HotSpotRuntime(HotSpotVMConfig config) { | 47 |
48 public HotSpotRuntime(HotSpotVMConfig config, Compiler compiler) { | |
48 this.config = config; | 49 this.config = config; |
50 this.compiler = compiler; | |
49 regConfig = new HotSpotRegisterConfig(config, false); | 51 regConfig = new HotSpotRegisterConfig(config, false); |
50 globalStubRegConfig = new HotSpotRegisterConfig(config, true); | 52 globalStubRegConfig = new HotSpotRegisterConfig(config, true); |
51 } | 53 } |
52 | 54 |
53 @Override | 55 @Override |
139 } | 141 } |
140 | 142 |
141 @Override | 143 @Override |
142 public RiType getRiType(Class<?> javaClass) { | 144 public RiType getRiType(Class<?> javaClass) { |
143 assert javaClass != null; | 145 assert javaClass != null; |
144 return Compiler.getVMEntries().getType(javaClass); | 146 return compiler.getVMEntries().getType(javaClass); |
145 } | 147 } |
146 | 148 |
147 @Override | 149 @Override |
148 public RiSnippets getSnippets() { | 150 public RiSnippets getSnippets() { |
149 throw new UnsupportedOperationException("getSnippets"); | 151 throw new UnsupportedOperationException("getSnippets"); |
164 return Modifier.isNative(method.accessFlags()); | 166 return Modifier.isNative(method.accessFlags()); |
165 } | 167 } |
166 | 168 |
167 @Override | 169 @Override |
168 public Object registerGlobalStub(CiTargetMethod targetMethod, String name) { | 170 public Object registerGlobalStub(CiTargetMethod targetMethod, String name) { |
169 return HotSpotTargetMethod.installStub(targetMethod, name); | 171 return HotSpotTargetMethod.installStub(compiler, targetMethod, name); |
170 } | 172 } |
171 | 173 |
172 @Override | 174 @Override |
173 public int sizeOfBasicObjectLock() { | 175 public int sizeOfBasicObjectLock() { |
174 // TODO shouldn't be hard coded | 176 // TODO shouldn't be hard coded |