Mercurial > hg > truffle
diff c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.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 | 2a36994d0967 |
children | 762de4b26788 |
line wrap: on
line diff
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java Mon Apr 04 21:02:45 2011 +0200 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java Thu Apr 07 15:32:25 2011 +0200 @@ -72,13 +72,15 @@ private final HotSpotVMConfig config; private final CiTarget target; private final RiRegisterConfig registerConfig; + private final Compiler compiler; private CiXirAssembler asm; - public HotSpotXirGenerator(HotSpotVMConfig config, CiTarget target, RiRegisterConfig registerConfig) { + public HotSpotXirGenerator(HotSpotVMConfig config, CiTarget target, RiRegisterConfig registerConfig, Compiler compiler) { this.config = config; this.target = target; this.registerConfig = registerConfig; + this.compiler = compiler; } private SimpleTemplates prologueTemplates = new SimpleTemplates(STATIC_METHOD) { @@ -336,8 +338,8 @@ } }; - private static CiRegister getGeneralParameterRegister(int index) { - return Compiler.getInstance().getRegisterConfig().getCallingConventionRegisters(CiCallingConvention.Type.RuntimeCall, RegisterFlag.CPU)[index]; + private CiRegister getGeneralParameterRegister(int index) { + return registerConfig.getCallingConventionRegisters(CiCallingConvention.Type.RuntimeCall, RegisterFlag.CPU)[index]; } private SimpleTemplates monitorExitTemplates = new SimpleTemplates(NULL_CHECK) { @@ -1240,7 +1242,7 @@ return new XirSnippet(newObjectArrayTemplates.get(site, UNRESOLVED), length); } assert arrayType == null; - arrayType = Compiler.getVMEntries().getPrimitiveArrayType(elementKind); + arrayType = compiler.getVMEntries().getPrimitiveArrayType(elementKind); return new XirSnippet(newTypeArrayTemplates.get(site, elementKind), length, XirArgument.forObject(arrayType)); }