changeset 1421:6223633ce7dd

changed VMExit/VMEntries to non-static, added eclipse c++ project, CIR interface changes
author Lukas Stadler <lukas.stadler@oracle.com>
date Fri, 23 Jul 2010 15:53:02 -0700
parents 44efca8a02d6
children 3483ec571caf
files .cproject .project .settings/org.eclipse.cdt.core.prefs .settings/org.eclipse.cdt.ui.prefs c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotConstantPool.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotField.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotInternalObject.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethod.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotSignature.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTargetMethod.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotType.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypePrimitive.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotVMConfig.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/LoggingProxy.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMEntries.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMEntriesNative.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMExits.java c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMExitsNative.java clean domake make/Makefile make/linux/Makefile src/share/vm/c1x/c1x_Compiler.cpp src/share/vm/c1x/c1x_Compiler.hpp src/share/vm/c1x/c1x_VMEntries.cpp src/share/vm/c1x/c1x_VMEntries.hpp src/share/vm/c1x/c1x_VMExits.cpp src/share/vm/c1x/c1x_VMExits.hpp src/share/vm/classfile/vmSymbols.hpp src/share/vm/includeDB_compiler1 src/share/vm/runtime/javaCalls.cpp src/share/vm/runtime/javaCalls.hpp
diffstat 36 files changed, 2030 insertions(+), 425 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.cproject	Fri Jul 23 15:53:02 2010 -0700
@@ -0,0 +1,668 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+	<storageModule moduleId="org.eclipse.cdt.core.settings">
+		<cconfiguration id="cdt.managedbuild.toolchain.gnu.solaris.base.945602881">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.solaris.base.945602881" moduleId="org.eclipse.cdt.core.settings" name="Default">
+				<externalSettings/>
+				<extensions>
+					<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactName="c1x4hotspot" buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.solaris.base.945602881" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
+					<folderInfo id="cdt.managedbuild.toolchain.gnu.solaris.base.945602881.305678577" name="/" resourcePath="">
+						<toolChain id="cdt.managedbuild.toolchain.gnu.base.1866612258" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">
+							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.2075405295" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
+							<builder arguments="${workspace_loc:/c1x4hotspot}/domake" autoBuildTarget="jvmg1" buildPath="${workspace_loc:/c1x4hotspot}/make" cleanBuildTarget="clean" command="bash" enableAutoBuild="true" enableCleanBuild="false" enabledIncrementalBuild="true" id="cdt.managedbuild.target.gnu.builder.base.81453037" incrementalBuildTarget="jvmg1" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelizationNumber="1" superClass="cdt.managedbuild.target.gnu.builder.base">
+								<outputEntries>
+									<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="make"/>
+									<entry flags="VALUE_WORKSPACE_PATH" kind="outputPath" name="build/linux/linux_amd64_compiler1/jvmg"/>
+								</outputEntries>
+							</builder>
+							<tool id="cdt.managedbuild.tool.gnu.archiver.base.1094883386" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
+							<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1342888057" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
+								<option id="gnu.cpp.compiler.option.include.paths.801956928" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/c1x4hotspot/build/solaris/solaris_amd64_compiler1/generated}&quot;"/>
+								</option>
+								<option id="gnu.cpp.compiler.option.preprocessor.def.634868600" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
+									<listOptionValue builtIn="false" value="_LP64"/>
+									<listOptionValue builtIn="false" value="_REENTRANT"/>
+									<listOptionValue builtIn="false" value="AMD64"/>
+									<listOptionValue builtIn="false" value="ASSERT"/>
+									<listOptionValue builtIn="false" value="COMPILER1"/>
+									<listOptionValue builtIn="false" value="DEBUG"/>
+									<listOptionValue builtIn="false" value="VM_LITTLE_ENDIAN"/>
+								</option>
+								<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.866181452" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1535888880" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
+								<option id="gnu.c.compiler.option.preprocessor.def.symbols.825962493" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
+									<listOptionValue builtIn="false" value="AMD64"/>
+									<listOptionValue builtIn="false" value="ASSERT"/>
+									<listOptionValue builtIn="false" value="DEBUG"/>
+									<listOptionValue builtIn="false" value="COMPILER1"/>
+									<listOptionValue builtIn="false" value="_REENTRANT"/>
+									<listOptionValue builtIn="false" value="VM_LITTLE_ENDIAN"/>
+									<listOptionValue builtIn="false" value="_LP64=1"/>
+								</option>
+								<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.906671119" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.c.linker.base.1271041307" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
+							<tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.550499946" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base">
+								<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.274517766" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+								</inputType>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.assembler.base.554053529" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
+								<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1055083385" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+							</tool>
+						</toolChain>
+					</folderInfo>
+					<sourceEntries>
+						<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src/share/vm"/>
+						<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src/cpu/x86/vm"/>
+						<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="build/solaris/solaris_amd64_compiler1/generated"/>
+						<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src/os/linux/vm"/>
+						<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src/os_cpu/linux_x86"/>
+						<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src/os/linux/launcher"/>
+					</sourceEntries>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+			<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
+			<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
+			<storageModule moduleId="scannerConfiguration">
+				<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+				<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+					<buildOutputProvider>
+						<openAction enabled="true" filePath=""/>
+						<parser enabled="true"/>
+					</buildOutputProvider>
+					<scannerInfoProvider id="specsFile">
+						<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+						<parser enabled="true"/>
+					</scannerInfoProvider>
+				</profile>
+				<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+					<buildOutputProvider>
+						<openAction enabled="true" filePath=""/>
+						<parser enabled="true"/>
+					</buildOutputProvider>
+					<scannerInfoProvider id="makefileGenerator">
+						<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
+						<parser enabled="true"/>
+					</scannerInfoProvider>
+				</profile>
+				<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+					<buildOutputProvider>
+						<openAction enabled="true" filePath=""/>
+						<parser enabled="true"/>
+					</buildOutputProvider>
+					<scannerInfoProvider id="specsFile">
+						<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+						<parser enabled="true"/>
+					</scannerInfoProvider>
+				</profile>
+				<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+					<buildOutputProvider>
+						<openAction enabled="true" filePath=""/>
+						<parser enabled="true"/>
+					</buildOutputProvider>
+					<scannerInfoProvider id="specsFile">
+						<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+						<parser enabled="true"/>
+					</scannerInfoProvider>
+				</profile>
+				<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+					<buildOutputProvider>
+						<openAction enabled="true" filePath=""/>
+						<parser enabled="true"/>
+					</buildOutputProvider>
+					<scannerInfoProvider id="specsFile">
+						<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+						<parser enabled="true"/>
+					</scannerInfoProvider>
+				</profile>
+				<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+					<buildOutputProvider>
+						<openAction enabled="true" filePath=""/>
+						<parser enabled="true"/>
+					</buildOutputProvider>
+					<scannerInfoProvider id="specsFile">
+						<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
+						<parser enabled="true"/>
+					</scannerInfoProvider>
+				</profile>
+				<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+					<buildOutputProvider>
+						<openAction enabled="true" filePath=""/>
+						<parser enabled="true"/>
+					</buildOutputProvider>
+					<scannerInfoProvider id="specsFile">
+						<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
+						<parser enabled="true"/>
+					</scannerInfoProvider>
+				</profile>
+				<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+					<buildOutputProvider>
+						<openAction enabled="true" filePath=""/>
+						<parser enabled="true"/>
+					</buildOutputProvider>
+					<scannerInfoProvider id="specsFile">
+						<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
+						<parser enabled="true"/>
+					</scannerInfoProvider>
+				</profile>
+				<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.solaris.base.945602881;cdt.managedbuild.toolchain.gnu.solaris.base.945602881.305678577;cdt.managedbuild.tool.gnu.solaris.cpp.compiler.base.429326045;cdt.managedbuild.tool.gnu.cpp.compiler.input.1860785837">
+					<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
+					<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="makefileGenerator">
+							<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+				</scannerConfigBuildInfo>
+				<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.solaris.base.945602881;cdt.managedbuild.toolchain.gnu.solaris.base.945602881.305678577;cdt.managedbuild.tool.gnu.cpp.compiler.base.1342888057;cdt.managedbuild.tool.gnu.cpp.compiler.input.866181452">
+					<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
+					<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="makefileGenerator">
+							<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+				</scannerConfigBuildInfo>
+				<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.solaris.base.945602881;cdt.managedbuild.toolchain.gnu.solaris.base.945602881.388217325;cdt.managedbuild.tool.gnu.solaris.c.compiler.base.212558466;cdt.managedbuild.tool.gnu.c.compiler.input.1115218695">
+					<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+					<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="makefileGenerator">
+							<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+				</scannerConfigBuildInfo>
+				<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.solaris.base.945602881;cdt.managedbuild.toolchain.gnu.solaris.base.945602881.305678577;cdt.managedbuild.tool.gnu.solaris.c.compiler.base.351149667;cdt.managedbuild.tool.gnu.c.compiler.input.820447325">
+					<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+					<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="makefileGenerator">
+							<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+				</scannerConfigBuildInfo>
+				<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.solaris.base.945602881;cdt.managedbuild.toolchain.gnu.solaris.base.945602881.388217325;cdt.managedbuild.tool.gnu.solaris.cpp.compiler.base.377383651;cdt.managedbuild.tool.gnu.cpp.compiler.input.103897085">
+					<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
+					<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="makefileGenerator">
+							<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+				</scannerConfigBuildInfo>
+				<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.solaris.base.945602881;cdt.managedbuild.toolchain.gnu.solaris.base.945602881.305678577;cdt.managedbuild.tool.gnu.c.compiler.base.1535888880;cdt.managedbuild.tool.gnu.c.compiler.input.906671119">
+					<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+					<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="makefileGenerator">
+							<runAction arguments="-E -P -v -dD" command="" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+					<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+						<buildOutputProvider>
+							<openAction enabled="true" filePath=""/>
+							<parser enabled="true"/>
+						</buildOutputProvider>
+						<scannerInfoProvider id="specsFile">
+							<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
+							<parser enabled="true"/>
+						</scannerInfoProvider>
+					</profile>
+				</scannerConfigBuildInfo>
+			</storageModule>
+		</cconfiguration>
+	</storageModule>
+	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+		<project id="c1x4hotspot.null.1712822257" name="c1x4hotspot"/>
+	</storageModule>
+</cproject>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.project	Fri Jul 23 15:53:02 2010 -0700
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>c1x4hotspot</name>
+	<comment></comment>
+	<projects>
+		<project>C1X</project>
+		<project>CRI</project>
+		<project>HotSpotVM</project>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+			<triggers>auto,full,incremental,</triggers>
+			<arguments>
+				<dictionary>
+					<key>?children?</key>
+					<value>?name?=outputEntries\|?children?=?name?=entry\\\\\\\|\\\|?name?=entry\\\\\\\|\\\|\||</value>
+				</dictionary>
+				<dictionary>
+					<key>?name?</key>
+					<value></value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.append_environment</key>
+					<value>true</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+					<value>jvmg1</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.buildArguments</key>
+					<value>${workspace_loc:/c1x4hotspot}/domake</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.buildCommand</key>
+					<value>bash</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.buildLocation</key>
+					<value>${workspace_loc:/c1x4hotspot}/make</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+					<value>clean</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.contents</key>
+					<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+					<value>true</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+					<value>false</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
+					<value>true</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+					<value>jvmg1</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.stopOnError</key>
+					<value>true</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+					<value>false</value>
+				</dictionary>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+			<triggers>full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.cdt.core.cnature</nature>
+		<nature>org.eclipse.cdt.core.ccnature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+	</natures>
+	<linkedResources>
+		<link>
+			<name>client</name>
+			<type>2</type>
+			<location>/home/ls/source/jre1.7.0/lib/amd64/client</location>
+		</link>
+	</linkedResources>
+</projectDescription>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.settings/org.eclipse.cdt.core.prefs	Fri Jul 23 15:53:02 2010 -0700
@@ -0,0 +1,152 @@
+#Wed Jul 21 16:31:58 PDT 2010
+eclipse.preferences.version=1
+org.eclipse.cdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.cdt.core.formatter.alignment_for_base_clause_in_type_declaration=80
+org.eclipse.cdt.core.formatter.alignment_for_compact_if=0
+org.eclipse.cdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.cdt.core.formatter.alignment_for_declarator_list=16
+org.eclipse.cdt.core.formatter.alignment_for_enumerator_list=48
+org.eclipse.cdt.core.formatter.alignment_for_expression_list=0
+org.eclipse.cdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.cdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.cdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.cdt.core.formatter.brace_position_for_array_initializer=next_line_shifted
+org.eclipse.cdt.core.formatter.brace_position_for_block=next_line_shifted
+org.eclipse.cdt.core.formatter.brace_position_for_block_in_case=next_line_shifted
+org.eclipse.cdt.core.formatter.brace_position_for_method_declaration=next_line
+org.eclipse.cdt.core.formatter.brace_position_for_namespace_declaration=next_line
+org.eclipse.cdt.core.formatter.brace_position_for_switch=next_line_shifted
+org.eclipse.cdt.core.formatter.brace_position_for_type_declaration=next_line
+org.eclipse.cdt.core.formatter.compact_else_if=true
+org.eclipse.cdt.core.formatter.continuation_indentation=2
+org.eclipse.cdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.cdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.cdt.core.formatter.indent_access_specifier_compare_to_type_header=false
+org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_access_specifier=true
+org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_namespace_header=true
+org.eclipse.cdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.cdt.core.formatter.indent_declaration_compare_to_template_header=true
+org.eclipse.cdt.core.formatter.indent_empty_lines=false
+org.eclipse.cdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.cdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.cdt.core.formatter.indentation.size=8
+org.eclipse.cdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.cdt.core.formatter.insert_new_line_after_template_declaration=insert
+org.eclipse.cdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.cdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.cdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.cdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.cdt.core.formatter.insert_new_line_before_identifier_in_function_declaration=insert
+org.eclipse.cdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
+org.eclipse.cdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.cdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.cdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.cdt.core.formatter.insert_space_after_closing_angle_bracket_in_template_arguments=insert
+org.eclipse.cdt.core.formatter.insert_space_after_closing_angle_bracket_in_template_parameters=insert
+org.eclipse.cdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.cdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.cdt.core.formatter.insert_space_after_colon_in_base_clause=insert
+org.eclipse.cdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.cdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.cdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.cdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.cdt.core.formatter.insert_space_after_comma_in_base_types=insert
+org.eclipse.cdt.core.formatter.insert_space_after_comma_in_declarator_list=insert
+org.eclipse.cdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.cdt.core.formatter.insert_space_after_comma_in_expression_list=insert
+org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.cdt.core.formatter.insert_space_after_comma_in_template_arguments=insert
+org.eclipse.cdt.core.formatter.insert_space_after_comma_in_template_parameters=insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_angle_bracket_in_template_arguments=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_angle_bracket_in_template_parameters=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_bracket=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_exception_specification=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.cdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.cdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.cdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_angle_bracket_in_template_arguments=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_angle_bracket_in_template_parameters=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_bracket=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_exception_specification=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_colon_in_base_clause=insert
+org.eclipse.cdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.cdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_comma_in_base_types=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_comma_in_declarator_list=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_comma_in_expression_list=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_comma_in_template_arguments=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_comma_in_template_parameters=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_angle_bracket_in_template_arguments=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_angle_bracket_in_template_parameters=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_namespace_declaration=insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_bracket=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_exception_specification=insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.cdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.cdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.cdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.cdt.core.formatter.insert_space_between_empty_brackets=do not insert
+org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_exception_specification=do not insert
+org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.cdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.cdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.cdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.cdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.cdt.core.formatter.lineSplit=80
+org.eclipse.cdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.cdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.cdt.core.formatter.tabulation.char=space
+org.eclipse.cdt.core.formatter.tabulation.size=2
+org.eclipse.cdt.core.formatter.use_tabs_only_for_leading_indentations=false
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.settings/org.eclipse.cdt.ui.prefs	Fri Jul 23 15:53:02 2010 -0700
@@ -0,0 +1,4 @@
+#Wed Jul 21 16:31:58 PDT 2010
+eclipse.preferences.version=1
+formatter_profile=org.eclipse.cdt.ui.default.gnu_profile
+formatter_settings_version=1
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java	Tue Jul 13 11:47:55 2010 -0700
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java	Fri Jul 23 15:53:02 2010 -0700
@@ -17,13 +17,11 @@
  */
 package com.sun.hotspot.c1x;
 
-import com.sun.c1x.C1XCompiler;
-import com.sun.c1x.C1XOptions;
-import com.sun.c1x.target.amd64.AMD64;
-import com.sun.cri.ci.CiCompiler;
-import com.sun.cri.ci.CiTarget;
-import com.sun.cri.ri.RiRegisterConfig;
-import com.sun.cri.xir.RiXirGenerator;
+import com.sun.c1x.*;
+import com.sun.c1x.target.amd64.*;
+import com.sun.cri.ci.*;
+import com.sun.cri.ri.*;
+import com.sun.cri.xir.*;
 
 /**
  *
@@ -34,35 +32,95 @@
  */
 public class Compiler {
 
-    private static CiCompiler compiler;
+    private static Compiler theInstance;
 
-    public static CiCompiler getCompiler() {
-
-        if (compiler == null) {
-            compiler = createCompiler();
+    public static Compiler getInstance() {
+        if (theInstance == null) {
+            theInstance = new Compiler();
         }
-
-        return compiler;
+        return theInstance;
     }
 
-    private static CiCompiler createCompiler() {
+    private static VMEntries vmEntries;
 
-        final HotSpotVMConfig config = VMEntries.getConfiguration();
-        final HotSpotRuntime runtime = new HotSpotRuntime(config);
-        final RiXirGenerator generator = new HotSpotXirGenerator(config);
+    public static VMEntries getVMEntries() {
+        if (vmEntries == null) {
+            System.out.println("getVMEntries");
+            try {
+                //vmEntries = LoggingProxy.getProxy(VMEntries.class, new VMEntriesNative());
+                vmEntries = new VMEntriesNative();
+            } catch (Throwable t) {
+                t.printStackTrace();
+            }
+        }
+        return vmEntries;
+    }
+
+    private static VMExits vmExits;
+
+    public static VMExits getVMExits() {
+        if (vmExits == null) {
+            System.out.println("getVMExits");
+            try {
+                //vmExits = LoggingProxy.getProxy(VMExits.class, new VMExitsNative());
+                vmExits = new VMExitsNative();
+            } catch (Throwable t) {
+                t.printStackTrace();
+            }
+        }
+        return vmExits;
+    }
+
+    private final CiCompiler compiler;
+    private final HotSpotVMConfig config;
+    private final HotSpotRuntime runtime;
+    private final RiRegisterConfig registerConfig;
+    private final CiTarget target;
+    private final RiXirGenerator generator;
+
+    private Compiler() {
+        config = getVMEntries().getConfiguration();
+        config.check();
+
+        runtime = new HotSpotRuntime(config);
         final int wordSize = 8;
         final int stackFrameAlignment = 8;
-        final int pageSize = 1024;
-        final RiRegisterConfig registerConfig = new HotSpotRegisterConfig(config);
-        final CiTarget target = new CiTarget(new AMD64(), registerConfig, true, wordSize, wordSize, wordSize, stackFrameAlignment, pageSize, wordSize, wordSize, 16);
-        final CiCompiler compiler = new C1XCompiler(runtime, target, generator);
+        registerConfig = new HotSpotRegisterConfig(config);
+        target = new CiTarget(new AMD64(), registerConfig, true, wordSize, wordSize, wordSize, stackFrameAlignment, config.vmPageSize, wordSize, wordSize, config.codeEntryAlignment, true);
+        generator = new HotSpotXirGenerator(config, registerConfig);
+        compiler = new C1XCompiler(runtime, target, generator);
 
         C1XOptions.setOptimizationLevel(3);
         C1XOptions.TraceBytecodeParserLevel = 4;
         C1XOptions.PrintCFGToFile = false;
         C1XOptions.PrintAssembly = false;// true;
         C1XOptions.PrintCompilation = true;
+        C1XOptions.GenAssertionCode = true;
+        C1XOptions.DetailedAsserts = true;
+    }
+
+    public CiCompiler getCompiler() {
         return compiler;
+    }
 
+    public HotSpotVMConfig getConfig() {
+        return config;
     }
+
+    public HotSpotRuntime getRuntime() {
+        return runtime;
+    }
+
+    public RiRegisterConfig getRegisterConfig() {
+        return registerConfig;
+    }
+
+    public CiTarget getTarget() {
+        return target;
+    }
+
+    public RiXirGenerator getGenerator() {
+        return generator;
+    }
+
 }
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotConstantPool.java	Tue Jul 13 11:47:55 2010 -0700
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotConstantPool.java	Fri Jul 23 15:53:02 2010 -0700
@@ -23,27 +23,27 @@
 
     @Override
     public Object lookupConstant(int cpi) {
-        return VMEntries.RiConstantPool_lookupConstant(constantPoolOop, cpi);
+        return Compiler.getVMEntries().RiConstantPool_lookupConstant(constantPoolOop, cpi);
     }
 
     @Override
     public RiMethod lookupMethod(int cpi, int byteCode) {
-        return VMEntries.RiConstantPool_lookupMethod(constantPoolOop, cpi, (byte) byteCode);
+        return Compiler.getVMEntries().RiConstantPool_lookupMethod(constantPoolOop, cpi, (byte) byteCode);
     }
 
     @Override
     public RiSignature lookupSignature(int cpi) {
-        return VMEntries.RiConstantPool_lookupSignature(constantPoolOop, cpi);
+        return Compiler.getVMEntries().RiConstantPool_lookupSignature(constantPoolOop, cpi);
     }
 
     @Override
     public RiType lookupType(int cpi, int opcode) {
-        return VMEntries.RiConstantPool_lookupType(constantPoolOop, cpi);
+        return Compiler.getVMEntries().RiConstantPool_lookupType(constantPoolOop, cpi);
     }
 
     @Override
     public RiField lookupField(int cpi, int opcode) {
-        return VMEntries.RiConstantPool_lookupField(constantPoolOop, cpi);
+        return Compiler.getVMEntries().RiConstantPool_lookupField(constantPoolOop, cpi);
     }
 
 }
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotField.java	Tue Jul 13 11:47:55 2010 -0700
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotField.java	Fri Jul 23 15:53:02 2010 -0700
@@ -54,7 +54,7 @@
 
     @Override
     public String name() {
-        return VMEntries.RiSignature_symbolToString(nameSymbol);
+        return Compiler.getVMEntries().RiSignature_symbolToString(nameSymbol);
     }
 
     @Override
@@ -62,4 +62,8 @@
         return type;
     }
 
+    public int offset() {
+        return offset;
+    }
+
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotInternalObject.java	Fri Jul 23 15:53:02 2010 -0700
@@ -0,0 +1,34 @@
+package com.sun.hotspot.c1x;
+
+public class HotSpotInternalObject {
+
+    private long id;
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + (int) (id ^ (id >>> 32));
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        HotSpotInternalObject other = (HotSpotInternalObject) obj;
+        if (id != other.id)
+            return false;
+        return true;
+    }
+
+    @Override
+    public String toString() {
+        return "HotSpotInternalObject [id=" + id + "]";
+    }
+
+}
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethod.java	Tue Jul 13 11:47:55 2010 -0700
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethod.java	Fri Jul 23 15:53:02 2010 -0700
@@ -17,7 +17,7 @@
 
     @Override
     public int accessFlags() {
-        return VMEntries.RiMethod_accessFlags(methodOop);
+        return Compiler.getVMEntries().RiMethod_accessFlags(methodOop);
     }
 
     @Override
@@ -29,7 +29,7 @@
     @Override
     public byte[] code() {
         if (code == null) {
-            code = VMEntries.RiMethod_code(methodOop);
+            code = Compiler.getVMEntries().RiMethod_code(methodOop);
         }
 
         return code;
@@ -49,7 +49,7 @@
 
     @Override
     public RiType holder() {
-        return VMEntries.RiMethod_holder(methodOop);
+        return Compiler.getVMEntries().RiMethod_holder(methodOop);
     }
 
     @Override
@@ -96,12 +96,12 @@
 
     @Override
     public int maxLocals() {
-        return VMEntries.RiMethod_maxLocals(methodOop);
+        return Compiler.getVMEntries().RiMethod_maxLocals(methodOop);
     }
 
     @Override
     public int maxStackSize() {
-        return VMEntries.RiMethod_maxStackSize(methodOop);
+        return Compiler.getVMEntries().RiMethod_maxStackSize(methodOop);
     }
 
     @Override
@@ -112,12 +112,12 @@
 
     @Override
     public String name() {
-        return VMEntries.RiMethod_name(methodOop);
+        return Compiler.getVMEntries().RiMethod_name(methodOop);
     }
 
     @Override
     public RiSignature signature() {
-        return new HotSpotSignature(VMEntries.RiMethod_signature(methodOop));
+        return new HotSpotSignature(Compiler.getVMEntries().RiMethod_signature(methodOop));
     }
 
 }
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java	Tue Jul 13 11:47:55 2010 -0700
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRegisterConfig.java	Fri Jul 23 15:53:02 2010 -0700
@@ -35,14 +35,15 @@
 
     @Override
     public CiRegister[] getAllocatableRegisters() {
-        return new CiRegister[] { AMD64.rax, AMD64.rbx, AMD64.rcx, AMD64.rdx, AMD64.rsi, AMD64.rdi, AMD64.r10, AMD64.r11};
+        return new CiRegister[] { AMD64.rax, AMD64.rbx, AMD64.rcx, AMD64.rdx, AMD64.rsi, AMD64.rdi, AMD64.r10, AMD64.r11, AMD64.xmm0, AMD64.xmm1, AMD64.xmm2, AMD64.xmm3, AMD64.xmm4, AMD64.xmm5,
+                        AMD64.xmm6, AMD64.xmm7, AMD64.xmm8, AMD64.xmm9, AMD64.xmm10, AMD64.xmm11, AMD64.xmm12, AMD64.xmm13, AMD64.xmm14, AMD64.xmm15};
     }
 
     private final CiRegister[] generalParameterRegisters;
     private final CiRegister[] xmmParameterRegisters = new CiRegister[] { AMD64.xmm0, AMD64.xmm1, AMD64.xmm2, AMD64.xmm3, AMD64.xmm4, AMD64.xmm5, AMD64.xmm6, AMD64.xmm7};
 
     public HotSpotRegisterConfig(HotSpotVMConfig config) {
-        if (config.isWindowsOs()) {
+        if (config.windowsOs) {
             generalParameterRegisters = new CiRegister[] { AMD64.rdx, AMD64.r8, AMD64.r9, AMD64.rdi, AMD64.rsi, AMD64.rcx};
         } else {
             generalParameterRegisters = new CiRegister[] { AMD64.rsi, AMD64.rdx, AMD64.rcx, AMD64.r8, AMD64.r9, AMD64.rdi};
@@ -142,7 +143,7 @@
 
     @Override
     public CiCallingConvention getRuntimeCallingConvention(CiKind[] parameters, CiTarget target) {
-        throw new UnsupportedOperationException();
+        return callingConvention(parameters, true, target);
     }
 
     @Override
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.java	Tue Jul 13 11:47:55 2010 -0700
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotRuntime.java	Fri Jul 23 15:53:02 2010 -0700
@@ -18,7 +18,6 @@
 package com.sun.hotspot.c1x;
 
 import java.io.ByteArrayOutputStream;
-import java.io.OutputStream;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
@@ -52,6 +51,10 @@
 
     private final HotSpotVMConfig config;
 
+    public static enum Entrypoints {
+        UNVERIFIED, VERIFIED
+    }
+
     public HotSpotRuntime(HotSpotVMConfig config) {
         this.config = config;
     }
@@ -69,12 +72,6 @@
     }
 
     @Override
-    public void codePrologue(RiMethod method, OutputStream out) {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
     public String disassemble(byte[] code) {
         return disassemble(code, new DisassemblyPrinter(false));
     }
@@ -148,7 +145,7 @@
 
     @Override
     public RiConstantPool getConstantPool(RiMethod method) {
-        return VMEntries.RiRuntime_getConstantPool(((HotSpotType) method.holder()).klassOop);
+        return Compiler.getVMEntries().RiRuntime_getConstantPool(((HotSpotType) method.holder()).klassOop);
     }
 
     @Override
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotSignature.java	Tue Jul 13 11:47:55 2010 -0700
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotSignature.java	Fri Jul 23 15:53:02 2010 -0700
@@ -99,7 +99,7 @@
         if (accessingClass instanceof HotSpotType) {
             accessor = ((HotSpotType) accessingClass).klassOop;
         }
-        return VMEntries.RiSignature_lookupType(arguments.get(index), accessor);
+        return Compiler.getVMEntries().RiSignature_lookupType(arguments.get(index), accessor);
     }
 
     @Override
@@ -114,7 +114,7 @@
 
     @Override
     public RiType returnType(RiType accessingClass) {
-        return VMEntries.RiSignature_lookupType(returnType, accessingClass);
+        return Compiler.getVMEntries().RiSignature_lookupType(returnType, accessingClass);
     }
 
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTargetMethod.java	Fri Jul 23 15:53:02 2010 -0700
@@ -0,0 +1,85 @@
+package com.sun.hotspot.c1x;
+
+import java.util.*;
+
+import com.sun.cri.ci.*;
+import com.sun.cri.ci.CiTargetMethod.*;
+import com.sun.cri.ri.*;
+
+public class HotSpotTargetMethod {
+
+    public final Object methodOop;
+    private byte[] code;
+    private int frameSize;
+
+    public int verifiedEntrypoint;
+    public int unverifiedEntrypoint;
+
+    public int relocationOffsets[];
+    public Object relocationData[];
+
+    private HotSpotTargetMethod(HotSpotVMConfig config, RiMethod method, CiTargetMethod targetMethod) {
+        methodOop = ((HotSpotMethod) method).methodOop;
+        code = targetMethod.targetCode();
+        frameSize = targetMethod.frameSize();
+        verifiedEntrypoint = targetMethod.entrypointCodeOffsets.get(HotSpotRuntime.Entrypoints.VERIFIED);
+        unverifiedEntrypoint = targetMethod.entrypointCodeOffsets.get(HotSpotRuntime.Entrypoints.UNVERIFIED);
+
+        Map<Integer, Object> relocations = new TreeMap<Integer, Object>();
+        if (!targetMethod.dataReferences.isEmpty()) {
+            for (DataPatch patch : targetMethod.dataReferences) {
+                if (patch.data.kind == CiKind.Object) {
+                    if (patch.data.asObject() instanceof RiType) {
+                        relocations.put(patch.pcOffset, patch.data.asObject());
+                    } else {
+                        throw new RuntimeException("unexpected data reference");
+                    }
+                }
+            }
+        }
+
+        if (!targetMethod.directCalls.isEmpty()) {
+            for (CiTargetMethod.Call call : targetMethod.directCalls) {
+                if (call.globalStubID instanceof Long) {
+                    relocations.put(call.pcOffset, (Long)call.globalStubID);
+                } else if (call.globalStubID instanceof CiRuntimeCall) {
+                    switch ((CiRuntimeCall) call.globalStubID) {
+                        case Debug:
+                            // relocations.put(call.pcOffset, config.debugStub);
+                            System.out.println("debug call");
+                            break;
+                        case UnwindException:
+                        case RegisterFinalizer:
+                        case HandleException:
+                        case OSRMigrationEnd:
+                        case JavaTimeMillis:
+                        case JavaTimeNanos:
+                        case ArithmethicLrem:
+                        case ArithmeticLdiv:
+                        case ArithmeticFrem:
+                        case ArithmeticDrem:
+                        case ArithmeticCos:
+                        case ArithmeticTan:
+                        case ArithmeticLog:
+                        case ArithmeticLog10:
+                        case ArithmeticSin:
+                        default:
+                            throw new RuntimeException("unexpected runtime call: " + call.globalStubID);
+                    }
+                }
+            }
+        }
+        relocationOffsets = new int[relocations.size()];
+        relocationData = new Object[relocations.size()];
+        int i=0;
+        for( Map.Entry<Integer, Object> entry: relocations.entrySet()) {
+            relocationOffsets[i] = entry.getKey();
+            relocationData[i++] = entry.getValue();
+        }
+    }
+
+    public static void installCode(HotSpotVMConfig config, RiMethod method, CiTargetMethod targetMethod) {
+        Compiler.getVMEntries().installCode(new HotSpotTargetMethod(config, method, targetMethod));
+    }
+
+}
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotType.java	Tue Jul 13 11:47:55 2010 -0700
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotType.java	Fri Jul 23 15:53:02 2010 -0700
@@ -45,8 +45,7 @@
 
     @Override
     public CiKind getRepresentationKind(Representation r) {
-        // TODO Auto-generated method stub
-        return null;
+        return CiKind.Object;
     }
 
     @Override
@@ -70,7 +69,7 @@
     @Override
     public boolean isArrayClass() {
         System.out.println("Checking for array class " + name());
-        return VMEntries.RiType_isArrayClass(klassOop);
+        return Compiler.getVMEntries().RiType_isArrayClass(klassOop);
     }
 
     @Override
@@ -87,12 +86,12 @@
 
     @Override
     public boolean isInstanceClass() {
-        return VMEntries.RiType_isInstanceClass(klassOop);
+        return Compiler.getVMEntries().RiType_isInstanceClass(klassOop);
     }
 
     @Override
     public boolean isInterface() {
-        return VMEntries.RiType_isInterface(klassOop);
+        return Compiler.getVMEntries().RiType_isInterface(klassOop);
     }
 
     @Override
@@ -108,7 +107,7 @@
 
     @Override
     public Class< ? > javaClass() {
-        return VMEntries.RiType_javaClass(klassOop);
+        return Compiler.getVMEntries().RiType_javaClass(klassOop);
     }
 
     @Override
@@ -118,7 +117,7 @@
 
     @Override
     public String name() {
-        return VMEntries.RiType_name(klassOop);
+        return Compiler.getVMEntries().RiType_name(klassOop);
     }
 
     @Override
@@ -127,4 +126,8 @@
         return null;
     }
 
+    public Object klassOop() {
+        return klassOop;
+    }
+
 }
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypePrimitive.java	Tue Jul 13 11:47:55 2010 -0700
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTypePrimitive.java	Fri Jul 23 15:53:02 2010 -0700
@@ -46,8 +46,7 @@
 
     @Override
     public CiKind getRepresentationKind(Representation r) {
-        // TODO Auto-generated method stub
-        return null;
+        return kind;
     }
 
     @Override
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotVMConfig.java	Tue Jul 13 11:47:55 2010 -0700
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotVMConfig.java	Fri Jul 23 15:53:02 2010 -0700
@@ -21,17 +21,29 @@
  * Used to communicate configuration details, runtime offsets, etc. to c1x upon compileMethod.
  *
  * @author Lukas Stadler
- *
  */
 public class HotSpotVMConfig {
 
     // os information, register layout, code generation, ...
-    private boolean windowsOs;
+    public boolean windowsOs;
+    public int codeEntryAlignment;
 
     // offsets, ...
+    public int vmPageSize;
+    public int stackShadowPages;
+    public int hubOffset;
 
-    public boolean isWindowsOs() {
-        return windowsOs;
+    // runtime stubs
+    public long instanceofStub;
+    public long debugStub;
+
+    public void check() {
+        assert vmPageSize >= 16;
+        assert codeEntryAlignment > 0;
+        assert stackShadowPages > 0;
+        assert instanceofStub != 0;
+        assert debugStub != 0;
+        System.out.println("Config::debugStub = " + Long.toHexString(debugStub));
     }
 
 }
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java	Tue Jul 13 11:47:55 2010 -0700
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java	Fri Jul 23 15:53:02 2010 -0700
@@ -21,19 +21,15 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import com.sun.c1x.target.amd64.*;
 import com.sun.cri.ci.CiKind;
 import com.sun.cri.ri.RiField;
 import com.sun.cri.ri.RiMethod;
 import com.sun.cri.ri.RiRegisterConfig;
 import com.sun.cri.ri.RiType;
 import com.sun.cri.ri.RiType.Representation;
-import com.sun.cri.xir.CiXirAssembler;
-import com.sun.cri.xir.RiXirGenerator;
-import com.sun.cri.xir.XirArgument;
-import com.sun.cri.xir.XirSite;
-import com.sun.cri.xir.XirSnippet;
-import com.sun.cri.xir.XirTemplate;
-import com.sun.cri.xir.CiXirAssembler.XirOperand;
+import com.sun.cri.xir.*;
+import com.sun.cri.xir.CiXirAssembler.*;
 
 /**
  *
@@ -42,37 +38,210 @@
  */
 public class HotSpotXirGenerator extends RiXirGenerator {
 
+    private final HotSpotVMConfig config;
+    private CiXirAssembler asm;
+    private final RiRegisterConfig registerConfig;
+
     private XirTemplate[] emptyTemplates = new XirTemplate[CiKind.values().length];
-    private final HotSpotVMConfig config;
+    private XirTemplate prologueTemplate;
+    private XirTemplate staticPrologueTemplate;
+    private XirTemplate epilogueTemplate;
 
-    public HotSpotXirGenerator(HotSpotVMConfig config) {
+    static class XirPair {
+
+        final XirTemplate resolved;
+        final XirTemplate unresolved;
+
+        XirPair(XirTemplate resolved, XirTemplate unresolved) {
+            this.resolved = resolved;
+            this.unresolved = unresolved;
+        }
+    }
+
+    private XirPair[] putFieldTemplates;
+    private XirPair[] getFieldTemplates;
+    private XirPair[] putStaticFieldTemplates;
+    private XirPair[] getStaticFieldTemplates;
+    private XirPair instanceofTemplate;
+    private XirPair instanceofTemplateNonnull;
+
+    public HotSpotXirGenerator(HotSpotVMConfig config, RiRegisterConfig registerConfig) {
         this.config = config;
+        this.registerConfig = registerConfig;
     }
 
     @Override
     public List<XirTemplate> buildTemplates(CiXirAssembler asm) {
+        this.asm = asm;
+
+        putFieldTemplates = new XirPair[CiKind.values().length];
+        getFieldTemplates = new XirPair[CiKind.values().length];
+        putStaticFieldTemplates = new XirPair[CiKind.values().length];
+        getStaticFieldTemplates = new XirPair[CiKind.values().length];
+
         List<XirTemplate> templates = new ArrayList<XirTemplate>();
-        for (int i = 0; i < CiKind.values().length; i++) {
+        for (int index = 0; index < CiKind.values().length; index++) {
 
-            CiKind curKind = CiKind.values()[i];
+            CiKind kind = CiKind.values()[index];
 
-            if (curKind == CiKind.Float || curKind == CiKind.Double)
+            if (kind == CiKind.Float || kind == CiKind.Double)
                 continue;
 
-            if (CiKind.values()[i] == CiKind.Void) {
-                asm.restart(CiKind.values()[i]);
-                emptyTemplates[i] = asm.finishTemplate("empty-" + CiKind.values()[i]);
+            if (CiKind.values()[index] == CiKind.Void) {
+                asm.restart(CiKind.values()[index]);
+                emptyTemplates[index] = asm.finishTemplate("empty-" + CiKind.values()[index]);
             } else {
                 asm.restart();
-                XirOperand result = asm.createTemp("result", CiKind.values()[i]);
-                emptyTemplates[i] = asm.finishTemplate(result, "empty-" + CiKind.values()[i]);
+                XirOperand result = asm.createTemp("result", CiKind.values()[index]);
+                emptyTemplates[index] = asm.finishTemplate(result, "empty-" + CiKind.values()[index]);
+
+                putFieldTemplates[index] = buildPutFieldTemplate(kind, kind == CiKind.Object, false);
+                getFieldTemplates[index] = buildGetFieldTemplate(kind, false);
+                putStaticFieldTemplates[index] = buildPutFieldTemplate(kind, kind == CiKind.Object, true);
+                getStaticFieldTemplates[index] = buildGetFieldTemplate(kind, true);
+// arrayLoadTemplates[index] = buildArrayLoad(kind, asm, true);
+// arrayStoreTemplates[index] = buildArrayStore(kind, asm, true, kind == CiKind.Object, kind == CiKind.Object);
+// newArrayTemplates[index] = buildNewArray(kind);
             }
-            templates.add(emptyTemplates[i]);
+            templates.add(emptyTemplates[index]);
         }
+        prologueTemplate = buildPrologue(false);
+        staticPrologueTemplate = buildPrologue(true);
+        epilogueTemplate = buildEpilogue();
+        instanceofTemplate = buildInstanceof(false);
+        instanceofTemplateNonnull = buildInstanceof(true);
 
         return templates;
     }
 
+    private XirTemplate buildPrologue(boolean staticMethod) {
+        asm.restart(CiKind.Void);
+        XirOperand sp = asm.createRegister("stack pointer", CiKind.Word, registerConfig.getStackPointerRegister());
+        XirOperand temp = asm.createRegister("temp (rax)", CiKind.Word, AMD64.rax);
+
+        asm.align(config.codeEntryAlignment);
+        asm.entrypoint(HotSpotRuntime.Entrypoints.UNVERIFIED);
+        if (!staticMethod) {
+            // TODO do some checking...
+            asm.add(temp, temp, asm.i(1));
+            asm.sub(temp, temp, asm.i(1));
+            asm.shouldNotReachHere();
+
+            asm.align(config.codeEntryAlignment);
+        }
+        asm.entrypoint(HotSpotRuntime.Entrypoints.VERIFIED);
+        // stack banging
+        asm.pload(CiKind.Word, temp, sp, asm.i(-config.stackShadowPages * config.vmPageSize), true);
+        asm.pushFrame();
+
+        return asm.finishTemplate(staticMethod ? "static prologue" : "prologue");
+    }
+
+    private XirTemplate buildEpilogue() {
+        asm.restart(CiKind.Void);
+        asm.popFrame();
+        // TODO safepoint check
+        return asm.finishTemplate("epilogue");
+    }
+
+    private XirPair buildGetFieldTemplate(CiKind kind, boolean isStatic) {
+        final XirTemplate resolved;
+        final XirTemplate unresolved;
+        {
+            // resolved case
+            XirOperand result = asm.restart(kind);
+            XirParameter object = asm.createInputParameter("object", CiKind.Object);
+            XirParameter fieldOffset = asm.createConstantInputParameter("fieldOffset", CiKind.Int);
+            asm.pload(kind, result, object, fieldOffset, true);
+            resolved = asm.finishTemplate("getfield<" + kind + ">");
+        }
+        if (isStatic) {
+            asm.restart(kind);
+            asm.shouldNotReachHere();
+            /*
+             * XirParameter object = asm.createInputParameter("object", CiKind.Object); XirParameter guard =
+             * asm.createInputParameter("guard", CiKind.Object); XirOperand fieldOffset = asm.createTemp("fieldOffset",
+             * CiKind.Int); if (isStatic) { callRuntimeThroughStub(asm, "resolveGetStatic", fieldOffset, guard); } else
+             * { callRuntimeThroughStub(asm, "resolveGetField", fieldOffset, guard); } asm.pload(kind, result, object,
+             * fieldOffset, true);
+             */
+
+            unresolved = asm.finishTemplate("getfield<" + kind + ">-unresolved");
+        } else {
+            unresolved = null;
+        }
+        return new XirPair(resolved, unresolved);
+    }
+
+    private XirPair buildPutFieldTemplate(CiKind kind, boolean genWriteBarrier, boolean isStatic) {
+        final XirTemplate resolved;
+        final XirTemplate unresolved;
+        {
+            // resolved case
+            asm.restart(CiKind.Void);
+            XirParameter object = asm.createInputParameter("object", CiKind.Object);
+            XirParameter value = asm.createInputParameter("value", kind);
+            XirParameter fieldOffset = asm.createConstantInputParameter("fieldOffset", CiKind.Int);
+            asm.pstore(kind, object, fieldOffset, value, true);
+            if (genWriteBarrier) {
+                // TODO write barrier
+                // addWriteBarrier(asm, object, value);
+            }
+            resolved = asm.finishTemplate("putfield<" + kind + ", " + genWriteBarrier + ">");
+        }
+        if (isStatic) {
+            // unresolved case
+            asm.restart(CiKind.Void);
+            asm.shouldNotReachHere();
+            /*
+             * XirParameter object = asm.createInputParameter("object", CiKind.Object); XirParameter value =
+             * asm.createInputParameter("value", kind); XirParameter guard = asm.createInputParameter("guard",
+             * CiKind.Object); XirOperand fieldOffset = asm.createTemp("fieldOffset", CiKind.Int); if (isStatic) {
+             * callRuntimeThroughStub(asm, "resolvePutStatic", fieldOffset, guard); } else { callRuntimeThroughStub(asm,
+             * "resolvePutField", fieldOffset, guard); } asm.pstore(kind, object, fieldOffset, value, true); if
+             * (genWriteBarrier) { addWriteBarrier(asm, object, value); }
+             */
+            unresolved = asm.finishTemplate("putfield<" + kind + ", " + genWriteBarrier + ">-unresolved");
+        } else {
+            unresolved = null;
+        }
+        return new XirPair(resolved, unresolved);
+    }
+
+    private XirPair buildInstanceof(boolean nonnull) {
+        XirTemplate resolved;
+        XirTemplate unresolved;
+        {
+            XirOperand result = asm.restart(CiKind.Boolean);
+            asm.callRuntime(config.instanceofStub, result);
+
+            XirParameter object = asm.createInputParameter("object", CiKind.Object);
+            XirParameter hub = asm.createConstantInputParameter("hub", CiKind.Object);
+            XirOperand temp = asm.createTemp("temp", CiKind.Object);
+            XirLabel pass = asm.createInlineLabel("pass");
+            XirLabel fail = asm.createInlineLabel("fail");
+            asm.mov(result, asm.b(false));
+            if (!nonnull) {
+                // first check for null
+                asm.jeq(fail, object, asm.o(null));
+            }
+            asm.pload(CiKind.Object, temp, object, asm.i(config.hubOffset), !nonnull);
+            asm.jneq(fail, temp, hub);
+            asm.bindInline(pass);
+            asm.mov(result, asm.b(true));
+            asm.bindInline(fail);
+            resolved = asm.finishTemplate("instanceof-leaf<" + nonnull + ">");
+        }
+        {/*
+          * // unresolved instanceof unresolved = buildUnresolvedInstanceOf(nonnull);
+          */
+            asm.restart(CiKind.Boolean);
+            asm.shouldNotReachHere();
+            unresolved = asm.finishTemplate("instanceof-leaf<" + nonnull + ">");
+        }
+        return new XirPair(resolved, unresolved);
+    }
+
     @Override
     public XirSnippet genArrayLength(XirSite site, XirArgument array) {
         return new XirSnippet(emptyTemplates[CiKind.Int.ordinal()]);
@@ -94,22 +263,61 @@
     }
 
     @Override
-    public XirSnippet genEntrypoint(XirSite site) {
-        return new XirSnippet(emptyTemplates[CiKind.Void.ordinal()]);
+    public XirSnippet genPrologue(XirSite site, RiMethod method) {
+        boolean staticMethod = Modifier.isStatic(method.accessFlags());
+        return new XirSnippet(staticMethod ? staticPrologueTemplate : prologueTemplate);
+    }
+
+    @Override
+    public XirSnippet genEpilogue(XirSite site, RiMethod method) {
+        return new XirSnippet(epilogueTemplate);
     }
 
     @Override
     public XirSnippet genGetField(XirSite site, XirArgument receiver, RiField field) {
-        return new XirSnippet(emptyTemplates[field.kind().ordinal()]);
+        XirPair pair = getStaticFieldTemplates[field.kind().ordinal()];
+        assert field.isResolved() : "getfield doesn't expect unresolved fields";
+        XirArgument offset = XirArgument.forInt(((HotSpotField) field).offset());
+        return new XirSnippet(pair.resolved, receiver, offset);
     }
 
     @Override
     public XirSnippet genGetStatic(XirSite site, XirArgument staticTuple, RiField field) {
-        return new XirSnippet(emptyTemplates[field.kind().ordinal()]);
+        XirPair pair = getStaticFieldTemplates[field.kind().ordinal()];
+        if (field.isResolved()) {
+            XirArgument offset = XirArgument.forInt(((HotSpotField) field).offset());
+            return new XirSnippet(pair.resolved, staticTuple, offset);
+        }
+        return new XirSnippet(pair.unresolved, staticTuple, null);
+    }
+
+    @Override
+    public XirSnippet genPutField(XirSite site, XirArgument receiver, RiField field, XirArgument value) {
+        XirPair pair = putFieldTemplates[field.kind().ordinal()];
+        assert field.isResolved() : "putfield doesn't expect unresolved fields";
+        XirArgument offset = XirArgument.forInt(((HotSpotField) field).offset());
+        return new XirSnippet(pair.resolved, receiver, value, offset);
+    }
+
+    @Override
+    public XirSnippet genPutStatic(XirSite site, XirArgument staticTuple, RiField field, XirArgument value) {
+        XirPair pair = putFieldTemplates[field.kind().ordinal()];
+        if (field.isResolved()) {
+            XirArgument offset = XirArgument.forInt(((HotSpotField) field).offset());
+            return new XirSnippet(pair.resolved, staticTuple, value, offset);
+        }
+        return new XirSnippet(pair.unresolved, staticTuple, value);
     }
 
     @Override
     public XirSnippet genInstanceOf(XirSite site, XirArgument receiver, XirArgument hub, RiType type) {
+        /*
+        if (type.isResolved()) {
+            return new XirSnippet(instanceofTemplate.resolved, receiver, hub);
+        }
+        // XirArgument guard = guardFor(type, ResolveClass.SNIPPET);
+        return new XirSnippet(instanceofTemplate.unresolved, receiver);
+        */
         return new XirSnippet(emptyTemplates[CiKind.Boolean.ordinal()]);
     }
 
@@ -164,18 +372,17 @@
     }
 
     @Override
-    public XirSnippet genPutField(XirSite site, XirArgument receiver, RiField field, XirArgument value) {
-        return new XirSnippet(emptyTemplates[CiKind.Void.ordinal()]);
-    }
+    public XirSnippet genResolveClass(XirSite site, RiType type, Representation representation) {
+        System.out.println("genResolveClass " + type + ", " + representation);
+        XirOperand result = asm.restart(CiKind.Object);
+        if (type.isResolved()) {
+            System.out.println("resolved");
+            asm.mov(result, asm.o(type));
+            return new XirSnippet(asm.finishTemplate(result, "resolve class"));
+        }
+        asm.shouldNotReachHere();
+        return new XirSnippet(asm.finishTemplate(result, "resolve class"));
 
-    @Override
-    public XirSnippet genPutStatic(XirSite site, XirArgument staticTuple, RiField field, XirArgument value) {
-        return new XirSnippet(emptyTemplates[CiKind.Void.ordinal()]);
-    }
-
-    @Override
-    public XirSnippet genResolveClass(XirSite site, RiType type, Representation representation) {
-        return new XirSnippet(emptyTemplates[CiKind.Object.ordinal()]);
     }
 
     @Override
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/LoggingProxy.java	Fri Jul 23 15:53:02 2010 -0700
@@ -0,0 +1,28 @@
+package com.sun.hotspot.c1x;
+
+import java.lang.reflect.*;
+
+public class LoggingProxy<T> implements InvocationHandler {
+
+    private T delegate;
+
+    public LoggingProxy(T delegate) {
+        this.delegate = delegate;
+    }
+
+    @Override
+    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+        int argCount = args == null ? 0 : args.length;
+        if (method.getParameterTypes().length != argCount)
+            throw new RuntimeException("wrong parameter count");
+        System.out.println("method " + method + " called with " + argCount + " args");
+        if (args == null)
+            return method.invoke(delegate);
+        return method.invoke(delegate, args);
+    }
+
+    public static <T> T getProxy(Class<T> interf, T delegate) {
+        Object obj = Proxy.newProxyInstance(interf.getClassLoader(), new Class[] { interf}, new LoggingProxy<T>(delegate));
+        return interf.cast(obj);
+    }
+}
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMEntries.java	Tue Jul 13 11:47:55 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-package com.sun.hotspot.c1x;
-
-import com.sun.cri.ri.RiConstantPool;
-import com.sun.cri.ri.RiField;
-import com.sun.cri.ri.RiMethod;
-import com.sun.cri.ri.RiSignature;
-import com.sun.cri.ri.RiType;
-
-public class VMEntries {
-
-    public static native byte[] RiMethod_code(Object methodOop);
-
-    public static native int RiMethod_maxStackSize(Object methodOop);
-
-    public static native int RiMethod_maxLocals(Object methodOop);
-
-    public static native RiType RiMethod_holder(Object methodOop);
-
-    public static native String RiMethod_signature(Object methodOop);
-
-    public static native String RiMethod_name(Object methodOop);
-
-    public static native RiType RiSignature_lookupType(String returnType, Object accessingClass);
-
-    public static native String RiSignature_symbolToString(Object symbolOop);
-
-    public static native Class< ? > RiType_javaClass(Object klassOop);
-
-    public static native String RiType_name(Object klassOop);
-
-    public static native Object RiConstantPool_lookupConstant(Object constantPoolOop, int cpi);
-
-    public static native RiMethod RiConstantPool_lookupMethod(Object constantPoolOop, int cpi, byte byteCode);
-
-    public static native RiSignature RiConstantPool_lookupSignature(Object constantPoolOop, int cpi);
-
-    public static native RiType RiConstantPool_lookupType(Object constantPoolOop, int cpi);
-
-    public static native RiField RiConstantPool_lookupField(Object constantPoolOop, int cpi);
-
-    public static native RiType findRiType(Object holderKlassOop);
-
-    public static native RiConstantPool RiRuntime_getConstantPool(Object klassOop);
-
-    public static native boolean RiType_isArrayClass(Object klassOop);
-
-    public static native boolean RiType_isInstanceClass(Object klassOop);
-
-    public static native boolean RiType_isInterface(Object klassOop);
-
-    public static native int RiMethod_accessFlags(Object methodOop);
-
-    public static native void installCode(Object methodOop, byte[] code, int frameSize);
-
-    public static native HotSpotVMConfig getConfiguration();
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMEntriesNative.java	Fri Jul 23 15:53:02 2010 -0700
@@ -0,0 +1,79 @@
+package com.sun.hotspot.c1x;
+
+import com.sun.cri.ri.RiConstantPool;
+import com.sun.cri.ri.RiField;
+import com.sun.cri.ri.RiMethod;
+import com.sun.cri.ri.RiSignature;
+import com.sun.cri.ri.RiType;
+
+public class VMEntriesNative implements VMEntries {
+
+    @Override
+    public native byte[] RiMethod_code(Object methodOop);
+
+    @Override
+    public native int RiMethod_maxStackSize(Object methodOop);
+
+    @Override
+    public native int RiMethod_maxLocals(Object methodOop);
+
+    @Override
+    public native RiType RiMethod_holder(Object methodOop);
+
+    @Override
+    public native String RiMethod_signature(Object methodOop);
+
+    @Override
+    public native String RiMethod_name(Object methodOop);
+
+    @Override
+    public native RiType RiSignature_lookupType(String returnType, Object accessingClass);
+
+    @Override
+    public native String RiSignature_symbolToString(Object symbolOop);
+
+    @Override
+    public native Class< ? > RiType_javaClass(Object klassOop);
+
+    @Override
+    public native String RiType_name(Object klassOop);
+
+    @Override
+    public native Object RiConstantPool_lookupConstant(Object constantPoolOop, int cpi);
+
+    @Override
+    public native RiMethod RiConstantPool_lookupMethod(Object constantPoolOop, int cpi, byte byteCode);
+
+    @Override
+    public native RiSignature RiConstantPool_lookupSignature(Object constantPoolOop, int cpi);
+
+    @Override
+    public native RiType RiConstantPool_lookupType(Object constantPoolOop, int cpi);
+
+    @Override
+    public native RiField RiConstantPool_lookupField(Object constantPoolOop, int cpi);
+
+    @Override
+    public native RiType findRiType(Object holderKlassOop);
+
+    @Override
+    public native RiConstantPool RiRuntime_getConstantPool(Object klassOop);
+
+    @Override
+    public native boolean RiType_isArrayClass(Object klassOop);
+
+    @Override
+    public native boolean RiType_isInstanceClass(Object klassOop);
+
+    @Override
+    public native boolean RiType_isInterface(Object klassOop);
+
+    @Override
+    public native int RiMethod_accessFlags(Object methodOop);
+
+    @Override
+    public native void installCode(HotSpotTargetMethod targetMethod);
+
+    @Override
+    public native HotSpotVMConfig getConfiguration();
+}
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMExits.java	Tue Jul 13 11:47:55 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
- *
- * Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is
- * described in this document. In particular, and without limitation, these intellectual property rights may include one
- * or more of the U.S. patents listed at http://www.sun.com/patents and one or more additional patents or pending patent
- * applications in the U.S. and in other countries.
- *
- * U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard
- * license agreement and applicable provisions of the FAR and its supplements.
- *
- * Use is subject to license terms. Sun, Sun Microsystems, the Sun logo, Java and Solaris are trademarks or registered
- * trademarks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks are used under license and
- * are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries.
- *
- * UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd.
- */
-
-package com.sun.hotspot.c1x;
-
-import com.sun.cri.ci.CiCompiler;
-import com.sun.cri.ci.CiConstant;
-import com.sun.cri.ci.CiKind;
-import com.sun.cri.ci.CiResult;
-import com.sun.cri.ri.RiConstantPool;
-import com.sun.cri.ri.RiField;
-import com.sun.cri.ri.RiMethod;
-import com.sun.cri.ri.RiSignature;
-import com.sun.cri.ri.RiType;
-
-/**
- *
- * @author Thomas Wuerthinger
- *
- *         Exits from the HotSpot VM into Java code.
- *
- */
-public class VMExits {
-
-    public static void compileMethod(RiMethod method, int entry_bci) {
-
-        assert method instanceof RiMethod : "And YES, this assert is necessary and a potential life saver as this method is called from the VM ;-)";
-
-        System.out.println("compileMethod in Java code called!!");
-
-        CiCompiler compiler = Compiler.getCompiler();
-        CiResult result = compiler.compileMethod(method, null);
-
-        System.out.println("Compilation result: ");
-        if (result.bailout() != null) {
-            System.out.println("Bailout:");
-            result.bailout().printStackTrace();
-        } else {
-            System.out.println(result.targetMethod());
-            VMEntries.installCode(((HotSpotMethod) method).methodOop, result.targetMethod().targetCode(), result.targetMethod().frameSize());
-        }
-    }
-
-    public static RiMethod createRiMethod(Object methodOop) {
-        System.out.println("creating RiMethod object");
-        RiMethod m = new HotSpotMethod(methodOop);
-        System.out.println("returning " + m);
-        return m;
-    }
-
-    public static RiSignature createRiSignature(Object symbolOop) {
-        System.out.println("Creating RiSignature object");
-        String name = VMEntries.RiSignature_symbolToString(symbolOop);
-        System.out.println("Signature name: " + name);
-        return new HotSpotSignature(name);
-    }
-
-    public static RiField createRiField(RiType holder, Object nameSymbol, RiType type, int offset) {
-        System.out.println("creating RiField object");
-        return new HotSpotField(holder, nameSymbol, type, offset);
-    }
-
-    public static RiType createRiType(Object klassOop) {
-        System.out.println("creating RiType object");
-        return new HotSpotType(klassOop);
-    }
-
-    public static RiType createRiTypePrimitive(int basicType) {
-        System.out.println("Creating primitive type with basicType " + basicType);
-        CiKind kind = null;
-        switch (basicType) {
-            case 4:
-                kind = CiKind.Boolean;
-                break;
-            case 5:
-                kind = CiKind.Char;
-                break;
-            case 6:
-                kind = CiKind.Float;
-                break;
-            case 7:
-                kind = CiKind.Double;
-                break;
-            case 8:
-                kind = CiKind.Byte;
-                break;
-            case 9:
-                kind = CiKind.Short;
-                break;
-            case 10:
-                kind = CiKind.Int;
-                break;
-            case 11:
-                kind = CiKind.Long;
-                break;
-            case 14:
-                kind = CiKind.Void;
-                break;
-            default:
-                throw new IllegalArgumentException("Unknown basic type: " + basicType);
-        }
-        System.out.println("Chosen kind: " + kind);
-        return new HotSpotTypePrimitive(kind);
-    }
-
-    public static RiType createRiTypeUnresolved(Object symbolOop, Object accessingKlassOop) {
-        System.out.println("Creating unresolved RiType object");
-        String name = VMEntries.RiSignature_symbolToString(symbolOop);
-        System.out.println("Class name: " + name);
-        return new HotSpotTypeUnresolved(name);
-    }
-
-    public static RiConstantPool createRiConstantPool(Object constantPoolOop) {
-        System.out.println("creating RiConstantPool object");
-        return new HotSpotConstantPool(constantPoolOop);
-    }
-
-    public static CiConstant createCiConstantInt(int value) {
-        return CiConstant.forInt(value);
-    }
-
-    public static CiConstant createCiConstantLong(long value) {
-        return CiConstant.forLong(value);
-    }
-
-    public static CiConstant createCiConstantFloat(float value) {
-        return CiConstant.forFloat(value);
-    }
-
-    public static CiConstant createCiConstantDouble(double value) {
-        return CiConstant.forDouble(value);
-    }
-
-    public static CiConstant createCiConstantObject(Object value) {
-        return CiConstant.forObject(value);
-    }
-
-    public static void main(String[] args) throws InterruptedException {
-        System.out.println(C1XHotSpotTests.add(1, 2));
-        Thread.sleep(5000);
-        System.out.println(C1XHotSpotTests.add(1, 2));
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMExitsNative.java	Fri Jul 23 15:53:02 2010 -0700
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is
+ * described in this document. In particular, and without limitation, these intellectual property rights may include one
+ * or more of the U.S. patents listed at http://www.sun.com/patents and one or more additional patents or pending patent
+ * applications in the U.S. and in other countries.
+ *
+ * U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard
+ * license agreement and applicable provisions of the FAR and its supplements.
+ *
+ * Use is subject to license terms. Sun, Sun Microsystems, the Sun logo, Java and Solaris are trademarks or registered
+ * trademarks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks are used under license and
+ * are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries.
+ *
+ * UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd.
+ */
+
+package com.sun.hotspot.c1x;
+
+import com.sun.cri.ci.*;
+import com.sun.cri.ri.*;
+
+/**
+ *
+ * @author Thomas Wuerthinger
+ *
+ *         Exits from the HotSpot VM into Java code.
+ *
+ */
+public class VMExitsNative implements VMExits {
+
+    @Override
+    public void compileMethod(RiMethod method, int entry_bci) {
+        try {
+            assert method instanceof RiMethod : "And YES, this assert is necessary and a potential life saver as this method is called from the VM ;-)";
+
+            Compiler compiler = Compiler.getInstance();
+            CiResult result = compiler.getCompiler().compileMethod(method, null);
+
+            if (result.bailout() != null) {
+                System.out.println("Bailout:");
+                result.bailout().printStackTrace();
+            } else {
+                System.out.println("Compilation result: ");
+                System.out.println(result.targetMethod());
+                HotSpotTargetMethod.installCode(compiler.getConfig(), method, result.targetMethod());
+            }
+        } catch (Throwable t) {
+            System.out.println("Compilation interrupted:");
+            t.printStackTrace();
+            if (t instanceof RuntimeException) {
+                throw (RuntimeException) t;
+            }
+            throw new RuntimeException(t);
+        }
+    }
+
+    @Override
+    public RiMethod createRiMethod(Object methodOop) {
+        System.out.println("creating RiMethod object");
+        RiMethod m = new HotSpotMethod(methodOop);
+        System.out.println("returning " + m);
+        return m;
+    }
+
+    @Override
+    public RiSignature createRiSignature(Object symbolOop) {
+        System.out.println("Creating RiSignature object");
+        String name = Compiler.getVMEntries().RiSignature_symbolToString(symbolOop);
+        System.out.println("Signature name: " + name);
+        return new HotSpotSignature(name);
+    }
+
+    @Override
+    public RiField createRiField(RiType holder, Object nameSymbol, RiType type, int offset) {
+        System.out.println("creating RiField object");
+        return new HotSpotField(holder, nameSymbol, type, offset);
+    }
+
+    @Override
+    public RiType createRiType(Object klassOop) {
+        System.out.println("creating RiType object");
+        return new HotSpotType(klassOop);
+    }
+
+    @Override
+    public RiType createRiTypePrimitive(int basicType) {
+        System.out.println("Creating primitive type with basicType " + basicType);
+        CiKind kind = null;
+        switch (basicType) {
+            case 4:
+                kind = CiKind.Boolean;
+                break;
+            case 5:
+                kind = CiKind.Char;
+                break;
+            case 6:
+                kind = CiKind.Float;
+                break;
+            case 7:
+                kind = CiKind.Double;
+                break;
+            case 8:
+                kind = CiKind.Byte;
+                break;
+            case 9:
+                kind = CiKind.Short;
+                break;
+            case 10:
+                kind = CiKind.Int;
+                break;
+            case 11:
+                kind = CiKind.Long;
+                break;
+            case 14:
+                kind = CiKind.Void;
+                break;
+            default:
+                throw new IllegalArgumentException("Unknown basic type: " + basicType);
+        }
+        System.out.println("Chosen kind: " + kind);
+        return new HotSpotTypePrimitive(kind);
+    }
+
+    @Override
+    public RiType createRiTypeUnresolved(Object symbolOop, Object accessingKlassOop) {
+        System.out.println("Creating unresolved RiType object");
+        String name = Compiler.getVMEntries().RiSignature_symbolToString(symbolOop);
+        System.out.println("Class name: " + name);
+        return new HotSpotTypeUnresolved(name);
+    }
+
+    @Override
+    public RiConstantPool createRiConstantPool(Object constantPoolOop) {
+        System.out.println("creating RiConstantPool object");
+        return new HotSpotConstantPool(constantPoolOop);
+    }
+
+    @Override
+    public CiConstant createCiConstantInt(int value) {
+        return CiConstant.forInt(value);
+    }
+
+    @Override
+    public CiConstant createCiConstantLong(long value) {
+        return CiConstant.forLong(value);
+    }
+
+    @Override
+    public CiConstant createCiConstantFloat(float value) {
+        return CiConstant.forFloat(value);
+    }
+
+    @Override
+    public CiConstant createCiConstantDouble(double value) {
+        return CiConstant.forDouble(value);
+    }
+
+    @Override
+    public CiConstant createCiConstantObject(Object value) {
+        return CiConstant.forObject(value);
+    }
+
+    @Override
+    public void main(String[] args) throws InterruptedException {
+        System.out.println(C1XHotSpotTests.add(1, 2));
+        Thread.sleep(5000);
+        System.out.println(C1XHotSpotTests.add(1, 2));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/clean	Fri Jul 23 15:53:02 2010 -0700
@@ -0,0 +1,5 @@
+#!/bin/bash
+pushd make
+LANG=C ARCH_DATA_MODEL=64 HOTSPOT_BUILD_JOBS=16 make clean
+popd
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/domake	Fri Jul 23 15:53:02 2010 -0700
@@ -0,0 +1,7 @@
+#!/bin/bash
+pushd make
+ALT_BOOTDIR=/usr/lib/jvm/java-6-sun LANG=C ARCH_DATA_MODEL=64 HOTSPOT_BUILD_JOBS=2 make jvmg1
+cp ../build/linux/linux_amd64_compiler1/jvmg/libjvm.so ../../jre1.7.0/lib/amd64/client
+cp ../build/linux/linux_amd64_compiler1/jvmg/libjsig.so ../../jre1.7.0/lib/amd64/client
+popd
+
--- a/make/Makefile	Tue Jul 13 11:47:55 2010 -0700
+++ b/make/Makefile	Fri Jul 23 15:53:02 2010 -0700
@@ -333,11 +333,11 @@
 	$(install-file)
 
 # Xusage file
-$(EXPORT_SERVER_DIR)/Xusage.txt $(EXPORT_CLIENT_DIR)/Xusage.txt $(EXPORT_KERNEL_DIR)/Xusage.txt: $(XUSAGE)
-	$(prep-target)
-	$(RM) $@.temp
-	$(SED) 's/\(separated by \)[;:]/\1$(PATH_SEP)/g' $< > $@.temp
-	$(MV) $@.temp $@
+#$(EXPORT_SERVER_DIR)/Xusage.txt $(EXPORT_CLIENT_DIR)/Xusage.txt $(EXPORT_KERNEL_DIR)/Xusage.txt: $(XUSAGE)
+#	$(prep-target)
+#	$(RM) $@.temp
+#	$(SED) 's/\(separated by \)[;:]/\1$(PATH_SEP)/g' $< > $@.temp
+#	$(MV) $@.temp $@
 
 #
 # Clean rules
--- a/make/linux/Makefile	Tue Jul 13 11:47:55 2010 -0700
+++ b/make/linux/Makefile	Fri Jul 23 15:53:02 2010 -0700
@@ -287,7 +287,7 @@
 
 $(TARGETS_C1):  $(SUBDIRS_C1)
 	cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS)
-	cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && ./test_gamma
+#	cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && ./test_gamma
 ifdef INSTALL
 	cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) install
 endif
--- a/src/share/vm/c1x/c1x_Compiler.cpp	Tue Jul 13 11:47:55 2010 -0700
+++ b/src/share/vm/c1x/c1x_Compiler.cpp	Fri Jul 23 15:53:02 2010 -0700
@@ -34,15 +34,11 @@
 	TRACE_C1X_1("initialize");
 
   JNIEnv *env = ((JavaThread *)Thread::current())->jni_environment();
-  jclass klass = env->FindClass("com/sun/hotspot/c1x/VMEntries");
+  jclass klass = env->FindClass("com/sun/hotspot/c1x/VMEntriesNative");
   assert(klass != NULL, "c1x VMEntries class not found");
   env->RegisterNatives(klass, VMEntries_methods, VMEntries_methods_count() );
   
-  if (Thread::current()->has_pending_exception()) {
-
-    Thread::current()->pending_exception()->print();
-    fatal("Could not register natives");
-  }
+  check_pending_exception("Could not register natives");
 }
 
 // Compilation entry point for methods
@@ -54,7 +50,7 @@
 
 	
 	ResourceMark rm;
-	//HandleMark hm;
+	HandleMark hm;
 
   CompilerThread::current()->set_compiling(true);
   oop rimethod = get_RiMethod(target);
--- a/src/share/vm/c1x/c1x_Compiler.hpp	Tue Jul 13 11:47:55 2010 -0700
+++ b/src/share/vm/c1x/c1x_Compiler.hpp	Fri Jul 23 15:53:02 2010 -0700
@@ -61,7 +61,6 @@
   static oop get_RiConstantPool(constantPoolOop cpOop);
 };
 
-
 // Tracing macros
 
 #define IF_TRACE_C1X_1 if (TraceC1X >= 1) 
--- a/src/share/vm/c1x/c1x_VMEntries.cpp	Tue Jul 13 11:47:55 2010 -0700
+++ b/src/share/vm/c1x/c1x_VMEntries.cpp	Fri Jul 23 15:53:02 2010 -0700
@@ -26,12 +26,13 @@
 # include "incls/_precompiled.incl"
 # include "incls/_c1x_VMEntries.cpp.incl"
 
+
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
 * Method:    RiMethod_code
 * Signature: (Ljava/lang/Object;)[B
 */
-JNIEXPORT jbyteArray JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1code(JNIEnv *env, jclass, jobject method) {
+JNIEXPORT jbyteArray JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1code(JNIEnv *env, jobject, jobject method) {
   methodOop m = (methodOop)JNIHandles::resolve(method);
   int code_size = m->code_size();
   jbyteArray result = env->NewByteArray(code_size);
@@ -44,7 +45,7 @@
 * Method:    RiMethod_maxStackSize
 * Signature: (Ljava/lang/Object;)I
 */
-JNIEXPORT jint JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1maxStackSize(JNIEnv *, jclass, jobject method) {
+JNIEXPORT jint JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1maxStackSize(JNIEnv *, jobject, jobject method) {
   methodOop m = (methodOop)JNIHandles::resolve(method);
   return m->max_stack();
 }
@@ -54,7 +55,7 @@
 * Method:    RiMethod_maxLocals
 * Signature: (Ljava/lang/Object;)I
 */
-JNIEXPORT jint JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1maxLocals(JNIEnv *, jclass, jobject method) {
+JNIEXPORT jint JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1maxLocals(JNIEnv *, jobject, jobject method) {
   methodOop m = (methodOop)JNIHandles::resolve(method);
   return m->max_locals();
 }
@@ -64,7 +65,7 @@
 * Method:    RiMethod_holder
 * Signature: (Ljava/lang/Object;)Lcom/sun/cri/ri/RiType;
 */
-JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1holder(JNIEnv *, jclass, jobject method) {
+JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1holder(JNIEnv *, jobject, jobject method) {
   VM_ENTRY_MARK
   methodOop m = (methodOop)JNIHandles::resolve(method);
   klassOop k = m->method_holder();
@@ -76,7 +77,7 @@
 * Method:    RiMethod_signature
 * Signature: (Ljava/lang/Object;)Lcom/sun/cri/ri/RiSignature;
 */
-JNIEXPORT jstring JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1signature(JNIEnv *env, jclass, jobject method) {
+JNIEXPORT jstring JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1signature(JNIEnv *env, jobject, jobject method) {
   methodOop m = (methodOop)JNIHandles::resolve(method);
   return env->NewStringUTF(m->signature()->as_utf8());
 }
@@ -86,7 +87,7 @@
 * Method:    RiMethod_name
 * Signature: (Ljava/lang/Object;)Ljava/lang/String;
 */
-JNIEXPORT jstring JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1name(JNIEnv *env, jclass, jobject method) {
+JNIEXPORT jstring JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1name(JNIEnv *env, jobject, jobject method) {
   methodOop m = (methodOop)JNIHandles::resolve(method);
   return env->NewStringUTF(m->name()->as_utf8());
 }
@@ -96,7 +97,7 @@
 * Method:    RiSignature_lookupType
 * Signature: (Ljava/lang/String;Lcom/sun/cri/ri/RiType;)Lcom/sun/cri/ri/RiType;
 */
-JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiSignature_1lookupType(JNIEnv *, jclass, jstring name, jobject accessor) {
+JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiSignature_1lookupType(JNIEnv *, jobject, jstring name, jobject accessor) {
   VM_ENTRY_MARK
   klassOop k = (klassOop)JNIHandles::resolve(accessor);
   oop n = JNIHandles::resolve_external_guard(name);
@@ -114,7 +115,7 @@
 * Method:    RiSignature_symbolToString
 * Signature: (Ljava/lang/Object;)Ljava/lang/String;
 */
-JNIEXPORT jstring JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiSignature_1symbolToString(JNIEnv *env, jclass, jobject symbol) {
+JNIEXPORT jstring JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiSignature_1symbolToString(JNIEnv *env, jobject, jobject symbol) {
   symbolOop s = (symbolOop)JNIHandles::resolve(symbol);
   return env->NewStringUTF(s->as_utf8());
 }
@@ -124,7 +125,7 @@
 * Method:    RiType_javaClass
 * Signature: (Ljava/lang/Object;)Ljava/lang/Class;
 */
-JNIEXPORT jclass JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiType_1javaClass(JNIEnv *, jclass, jobject klass) {
+JNIEXPORT jclass JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiType_1javaClass(JNIEnv *, jobject, jobject klass) {
   klassOop k = (klassOop)JNIHandles::resolve(klass);
   oop result = k->klass_part()->java_mirror();
   return (jclass) JNIHandles::make_local(Thread::current(), result);
@@ -135,7 +136,7 @@
 * Method:    RiType_name
 * Signature: (Ljava/lang/Object;)Ljava/lang/String;
 */
-JNIEXPORT jstring JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiType_1name(JNIEnv *env, jclass, jobject klass) {
+JNIEXPORT jstring JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiType_1name(JNIEnv *env, jobject, jobject klass) {
   klassOop k = (klassOop)JNIHandles::resolve(klass);
   return env->NewStringUTF(k->klass_part()->name()->as_utf8());
 }
@@ -146,7 +147,7 @@
 * Method:    RiConstantPool_lookupConstant
 * Signature: (Ljava/lang/Object;I)Ljava/lang/Object;
 */
-JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiConstantPool_1lookupConstant(JNIEnv *env, jclass, jobject cpHandle, jint index) {
+JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiConstantPool_1lookupConstant(JNIEnv *env, jobject, jobject cpHandle, jint index) {
 
   VM_ENTRY_MARK;
   constantPoolOop cp = (constantPoolOop)JNIHandles::resolve(cpHandle);
@@ -206,7 +207,7 @@
 * Method:    RiConstantPool_lookupMethod
 * Signature: (Ljava/lang/Object;I)Lcom/sun/cri/ri/RiMethod;
 */
-JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiConstantPool_1lookupMethod(JNIEnv *env, jclass, jobject cpHandle, jint index, jbyte byteCode) {
+JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiConstantPool_1lookupMethod(JNIEnv *env, jobject, jobject cpHandle, jint index, jbyte byteCode) {
   VM_ENTRY_MARK;
   constantPoolOop cp = (constantPoolOop)JNIHandles::resolve(cpHandle);
   Bytecodes::Code bc = (Bytecodes::Code)(((int)byteCode) & 0xFF);
@@ -220,7 +221,7 @@
 * Method:    RiConstantPool_lookupSignature
 * Signature: (Ljava/lang/Object;I)Lcom/sun/cri/ri/RiSignature;
 */
-JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiConstantPool_1lookupSignature(JNIEnv *env, jclass, jobject cpHandle, jint index) {
+JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiConstantPool_1lookupSignature(JNIEnv *env, jobject, jobject cpHandle, jint index) {
   fatal("currently unsupported");
   return NULL;
 }
@@ -230,7 +231,7 @@
 * Method:    RiConstantPool_lookupType
 * Signature: (Ljava/lang/Object;I)Lcom/sun/cri/ri/RiType;
 */
-JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiConstantPool_1lookupType(JNIEnv *env, jclass, jobject cpHandle, jint index) {
+JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiConstantPool_1lookupType(JNIEnv *env, jobject, jobject cpHandle, jint index) {
   VM_ENTRY_MARK;
   constantPoolOop cp = (constantPoolOop)JNIHandles::resolve(cpHandle);
   ciInstanceKlass* loading_klass = (ciInstanceKlass *)CURRENT_ENV->get_object(cp->pool_holder());
@@ -245,7 +246,7 @@
 * Method:    RiConstantPool_lookupField
 * Signature: (Ljava/lang/Object;I)Lcom/sun/cri/ri/RiField;
 */
-JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiConstantPool_1lookupField(JNIEnv *env, jclass, jobject cpHandle, jint index) {
+JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiConstantPool_1lookupField(JNIEnv *env, jobject, jobject cpHandle, jint index) {
   VM_ENTRY_MARK;
   constantPoolOop cp = (constantPoolOop)JNIHandles::resolve(cpHandle);
   ciInstanceKlass* loading_klass = (ciInstanceKlass *)CURRENT_ENV->get_object(cp->pool_holder());
@@ -258,7 +259,7 @@
 * Method:    findRiType
 * Signature: (Ljava/lang/Object;)Lcom/sun/cri/ri/RiType;
 */
-JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_findRiType(JNIEnv *, jclass, jobject klass) {
+JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_findRiType(JNIEnv *, jobject, jobject klass) {
   VM_ENTRY_MARK;
   klassOop o = (klassOop)JNIHandles::resolve(klass);
   return JNIHandles::make_local(THREAD, C1XCompiler::get_RiType(o));
@@ -269,7 +270,7 @@
 * Method:    RiRuntime_getConstantPool
 * Signature: (Ljava/lang/Object;)Lcom/sun/cri/ri/RiConstantPool;
 */
-JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiRuntime_1getConstantPool(JNIEnv *, jclass, jobject klass) {
+JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiRuntime_1getConstantPool(JNIEnv *, jobject, jobject klass) {
   VM_ENTRY_MARK;
   klassOop o = (klassOop)JNIHandles::resolve(klass);
   return JNIHandles::make_local(THREAD, C1XCompiler::get_RiConstantPool(((instanceKlass*)o->klass_part())->constants()));
@@ -280,7 +281,7 @@
 * Method:    RiType_isArrayClass
 * Signature: (Ljava/lang/Object;)Z
 */
-JNIEXPORT jboolean JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiType_1isArrayClass(JNIEnv *, jclass, jobject klass) {
+JNIEXPORT jboolean JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiType_1isArrayClass(JNIEnv *, jobject, jobject klass) {
   klassOop o = (klassOop)JNIHandles::resolve(klass);
   o->print();
   bool result = o->klass_part()->oop_is_array();
@@ -293,7 +294,7 @@
 * Method:    RiType_isInstanceClass
 * Signature: (Ljava/lang/Object;)Z
 */
-JNIEXPORT jboolean JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiType_1isInstanceClass(JNIEnv *, jclass, jobject klass) {
+JNIEXPORT jboolean JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiType_1isInstanceClass(JNIEnv *, jobject, jobject klass) {
   klassOop o = (klassOop)JNIHandles::resolve(klass);
   return o->klass_part()->oop_is_instanceKlass();
 }
@@ -303,7 +304,7 @@
 * Method:    RiType_isInterface
 * Signature: (Ljava/lang/Object;)Z
 */
-JNIEXPORT jboolean JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiType_1isInterface(JNIEnv *, jclass, jobject klass) {
+JNIEXPORT jboolean JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiType_1isInterface(JNIEnv *, jobject, jobject klass) {
   klassOop o = (klassOop)JNIHandles::resolve(klass);
   return o->klass_part()->is_interface();
 }
@@ -313,41 +314,147 @@
 * Method:    RiMethod_accessFlags
 * Signature: (Ljava/lang/Object;)I
 */
-JNIEXPORT jint JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1accessFlags(JNIEnv *, jclass, jobject method) {
+JNIEXPORT jint JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1accessFlags(JNIEnv *, jobject, jobject method) {
   methodOop m = (methodOop)JNIHandles::resolve(method);
   return m->access_flags().as_int();
 }
 
+
+// helpers used to set fields in the HotSpotVMConfig object
+jfieldID getFieldID(JNIEnv* env, jobject obj, const char* name, const char* sig) {
+  jfieldID id = env->GetFieldID(env->GetObjectClass(obj), name, sig);
+  if (id == NULL) {
+    tty->print_cr("field not found: %s (%s)", name, sig);
+    assert(id != NULL, "field not found");
+  }
+  return id;
+}
+
+void set_boolean(JNIEnv* env, jobject obj, const char* name, bool value) { env->SetBooleanField(obj, getFieldID(env, obj, name, "Z"), value); }
+void set_int(JNIEnv* env, jobject obj, const char* name, int value) { env->SetIntField(obj, getFieldID(env, obj, name, "I"), value); }
+void set_long(JNIEnv* env, jobject obj, const char* name, long value) { env->SetLongField(obj, getFieldID(env, obj, name, "J"), value); }
+
+jboolean get_boolean(JNIEnv* env, jobject obj, const char* name) { return env->GetBooleanField(obj, getFieldID(env, obj, name, "Z")); }
+jint get_int(JNIEnv* env, jobject obj, const char* name) { return env->GetIntField(obj, getFieldID(env, obj, name, "I")); }
+jobject get_object(JNIEnv* env, jobject obj, const char* name) { return env->GetObjectField(obj, getFieldID(env, obj, name, "Ljava/lang/Object;")); }
+jobject get_object(JNIEnv* env, jobject obj, const char* name, const char* sig) { return env->GetObjectField(obj, getFieldID(env, obj, name, sig)); }
+
+
+// Helpful routine for computing field offsets at run time rather than hardcoding them
+int compute_offset(klassOop klass_oop, const char* name, const char* sig) {
+  JavaThread* THREAD = JavaThread::current();
+  fieldDescriptor fd;
+  instanceKlass* ik = instanceKlass::cast(klass_oop);
+  symbolOop name_symbol = SymbolTable::probe(name, (int)strlen(name));
+  symbolOop signature_symbol   = SymbolTable::probe(sig, (int)strlen(sig));
+  if (name_symbol == NULL || signature_symbol == NULL || !ik->find_local_field(name_symbol, signature_symbol, &fd)) {
+    ResourceMark rm;
+    tty->print_cr("Invalid layout of %s at %s", ik->external_name(), name_symbol->as_C_string());
+    fatal("Invalid layout of c1x4hotspot class");
+  }
+  return fd.offset();
+}
+
+
+class TypeHelper {
+public:
+  jclass        jniHotSpotType;
+  jclass        jniHotSpotTargetMethod;
+  klassOop      HotSpotType;
+  klassOop      HotSpotTargetMethod;
+  int           HotSpotType_klassOop;
+
+  TypeHelper(JNIEnv* jniEnv) {
+    jniHotSpotType = jniEnv->FindClass("com/sun/hotspot/c1x/HotSpotType");
+    jniHotSpotTargetMethod = jniEnv->FindClass("com/sun/hotspot/c1x/HotSpotTargetMethod");
+  }
+
+  void initialize() {
+    HotSpotType = java_lang_Class::as_klassOop(JNIHandles::resolve(jniHotSpotType));
+    HotSpotTargetMethod = java_lang_Class::as_klassOop(JNIHandles::resolve(jniHotSpotTargetMethod));
+    HotSpotType_klassOop = compute_offset(HotSpotType, "klassOop", "Ljava/lang/Object;");
+  }
+};
+
+
+
+
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
 * Method:    installCode
-* Signature: (Ljava/lang/Object;[BI)V
+* Signature: (Lcom/sun/hotspot/c1x/HotSpotTargetMethod;)V
 */
-JNIEXPORT void JNICALL Java_com_sun_hotspot_c1x_VMEntries_installCode(JNIEnv *jniEnv, jclass, jobject method, jbyteArray code, jint frameSize) {
+JNIEXPORT void JNICALL Java_com_sun_hotspot_c1x_VMEntries_installCode(JNIEnv *jniEnv, jobject, jobject targetMethod) {
+  TypeHelper types(jniEnv);
 
-  methodOop m = (methodOop)JNIHandles::resolve(method);
-  jboolean isCopy = false;
-  jbyte *codeBytes = jniEnv->GetByteArrayElements(code, &isCopy);
-  // TODO: Check if we need to disallocate?
-  int codeSize = jniEnv->GetArrayLength(code);
-  VM_ENTRY_MARK;
-  ciEnv *env = CURRENT_ENV;
+  methodOop m = (methodOop)JNIHandles::resolve(get_object(jniEnv, targetMethod, "methodOop"));
+  jbyteArray code = (jbyteArray)get_object(jniEnv, targetMethod, "code", "[B");
+  jintArray relocationOffsetsObj = (jintArray)get_object(jniEnv, targetMethod, "relocationOffsets", "[I");
+  jobjectArray relocationDataObj = (jobjectArray)get_object(jniEnv, targetMethod, "relocationData", "[Ljava/lang/Object;");
+  jint frameSize = get_int(jniEnv, targetMethod, "frameSize");
 
-  env->set_oop_recorder(new OopRecorder(env->arena()));
-  env->set_debug_info(new DebugInformationRecorder(env->oop_recorder()));
-  env->set_dependencies(new Dependencies(env));
-  ciMethod *ciMethodObject = (ciMethod *)env->get_object(m);
   CodeOffsets offsets;
 
   // TODO: This is a hack.. Produce correct entries.
   offsets.set_value(CodeOffsets::Exceptions, 0);
   offsets.set_value(CodeOffsets::Deopt, 0);
 
-  CodeBuffer buffer((address)codeBytes, codeSize);
+  offsets.set_value(CodeOffsets::Entry, get_int(jniEnv, targetMethod, "unverifiedEntrypoint"));
+  offsets.set_value(CodeOffsets::Verified_Entry, get_int(jniEnv, targetMethod, "verifiedEntrypoint"));
+
+  VM_ENTRY_MARK;
+  ciEnv *env = CURRENT_ENV;
+
+  types.initialize();
+
+  env->set_oop_recorder(new OopRecorder(env->arena()));
+  env->set_debug_info(new DebugInformationRecorder(env->oop_recorder()));
+  env->set_dependencies(new Dependencies(env));
+  ciMethod *ciMethodObject = (ciMethod *)env->get_object(m);
+
+  int codeSize = ((arrayOop)JNIHandles::resolve(code))->length();
+  int relocationCount = relocationOffsetsObj == NULL ? 0 : ((arrayOop)JNIHandles::resolve(relocationOffsetsObj))->length();
+
+  CodeBuffer buffer("c1x nmethod", codeSize, relocationCount * relocInfo::length_limit);
+  buffer.initialize_oop_recorder(env->oop_recorder());
+
+  // copy the code into the newly created CodeBuffer
+  CodeSection* instructions = buffer.insts();
+  memcpy(instructions->start(), ((arrayOop)JNIHandles::resolve(code))->base(T_BYTE), codeSize);
+  instructions->set_end(instructions->start() + codeSize);
+
+  if (relocationCount > 0) {
+    jint* relocationOffsets = (jint*)((arrayOop)JNIHandles::resolve(relocationOffsetsObj))->base(T_INT);
+    oop* relocationObjects = (oop*)((arrayOop)JNIHandles::resolve(relocationDataObj))->base(T_OBJECT);
+
+    for (int i=0; i<relocationCount; i++) {
+      address inst = (address)instructions->start() + relocationOffsets[i];
+      oop obj = relocationObjects[i];
+      assert(obj != NULL, "NULL oop needn't be patched");
+
+      if (java_lang_boxing_object::is_instance(obj, T_LONG)) {
+          address operand = Assembler::locate_operand(inst, Assembler::call32_operand);
+          long dest = obj->long_field(java_lang_boxing_object::value_offset_in_bytes(T_LONG));
+          long disp = dest - (long)(operand + 4);
+          assert(disp == (int) disp, "disp doesn't fit in 32 bits");
+          *((int*)operand) = (int)disp;
+
+          instructions->relocate(inst, runtime_call_Relocation::spec(), Assembler::call32_operand);
+          tty->print_cr("relocating (Long)");
+      } else if (obj->is_a(types.HotSpotType)) {
+          address operand = Assembler::locate_operand(inst, Assembler::imm_operand);
+
+          *((oop**)operand) = obj->obj_field_addr<oop>(types.HotSpotType_klassOop);
+          instructions->relocate(inst, oop_Relocation::spec_for_immediate(), Assembler::imm_operand);
+          tty->print_cr("relocating (HotSpotType)");
+      } else {
+          tty->print_cr("unknown relocation type");
+      }
+    }
+  }
+
   buffer.print();
-  CodeSection *inst_section = buffer.insts();
-  inst_section->set_end(inst_section->start() + codeSize);
-  buffer.initialize_oop_recorder(env->oop_recorder());
+
   OopMapSet oop_map_set;
   ExceptionHandlerTable handler_table;
   ImplicitExceptionTable inc_table;
@@ -358,25 +465,26 @@
   }
 }
 
-// helpers used to set fields in the HotSpotVMConfig object
-#define SET_CONFIG_BOOLEAN(name, value) { jfieldID id = jniEnv->GetFieldID(klass, #name, "Z"); jniEnv->SetBooleanField(config, id, value); }
-#define SET_CONFIG_INT(name, value) { jfieldID id = jniEnv->GetFieldID(klass, #name, "I"); jniEnv->SetIntField(config, id, value); }
-
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
 * Method:    getConfiguration
 * Signature: ()Lcom/sun/hotspot/c1x/HotSpotVMConfig;
 */
-JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_getConfiguration(JNIEnv *jniEnv, jclass) {
-  jclass klass = jniEnv->FindClass("com/sun/hotspot/c1x/HotSpotVMConfig");
+JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_getConfiguration(JNIEnv *env, jobject) {
+  jclass klass = env->FindClass("com/sun/hotspot/c1x/HotSpotVMConfig");
   assert(klass != NULL, "HotSpot vm config class not found");
-  jobject config = jniEnv->AllocObject(klass);
-  jfieldID id = jniEnv->GetFieldID(klass, "windowsOs", "Z");
+  jobject config = env->AllocObject(klass);
 #ifdef _WIN64
-  SET_CONFIG_BOOLEAN(windowsOs, true)
+  set_boolean(env, config, "windowsOs", true);
 #else
-  SET_CONFIG_BOOLEAN(windowsOs, false)
+  set_boolean(env, config, "windowsOs", false);
 #endif
+  set_int(env, config, "codeEntryAlignment", CodeEntryAlignment);
+  set_int(env, config, "vmPageSize", os::vm_page_size());
+  set_int(env, config, "stackShadowPages", StackShadowPages);
+  set_int(env, config, "hubOffset", oopDesc::klass_offset_in_bytes());
+  set_long(env, config, "instanceofStub", (long)Runtime1::entry_for(Runtime1::slow_subtype_check_id));
+  set_long(env, config, "debugStub", (long)warning);
   return config;
 }
 
@@ -389,6 +497,7 @@
   {CC"RiMethod_signature",              CC"(Ljava/lang/Object;)Ljava/lang/String;",                                 FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1signature)},
   {CC"RiMethod_name",                   CC"(Ljava/lang/Object;)Ljava/lang/String;",                                 FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1name)},
   {CC"RiSignature_lookupType",          CC"(Ljava/lang/String;Ljava/lang/Object;)Lcom/sun/cri/ri/RiType;",          FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiSignature_1lookupType)},
+  {CC"RiSignature_symbolToString",      CC"(Ljava/lang/Object;)Ljava/lang/String;",                                 FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiSignature_1symbolToString)},
   {CC"RiType_javaClass",                CC"(Ljava/lang/Object;)Ljava/lang/Class;",                                  FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiType_1javaClass)},
   {CC"RiType_name",                     CC"(Ljava/lang/Object;)Ljava/lang/String;",                                 FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiType_1name)},
   {CC"RiConstantPool_lookupConstant",   CC"(Ljava/lang/Object;I)Ljava/lang/Object;",                                FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiConstantPool_1lookupConstant)},
@@ -401,10 +510,10 @@
   {CC"RiType_isInstanceClass",          CC"(Ljava/lang/Object;)Z",                                                  FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiType_1isInstanceClass)},
   {CC"RiType_isInterface",              CC"(Ljava/lang/Object;)Z",                                                  FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiType_1isInterface)},
   {CC"RiMethod_accessFlags",            CC"(Ljava/lang/Object;)I",                                                  FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1accessFlags)},
-  {CC"installCode",                     CC"(Ljava/lang/Object;[BI)V",                                               FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_installCode)},
+  {CC"installCode",                     CC"(Lcom/sun/hotspot/c1x/HotSpotTargetMethod;)V",                           FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_installCode)},
   {CC"getConfiguration",                CC"()Lcom/sun/hotspot/c1x/HotSpotVMConfig;",                                FN_PTR(Java_com_sun_hotspot_c1x_VMEntries_getConfiguration)}
 };
 
 int VMEntries_methods_count() {
   return sizeof(VMEntries_methods) / sizeof(JNINativeMethod);
-}
\ No newline at end of file
+}
--- a/src/share/vm/c1x/c1x_VMEntries.hpp	Tue Jul 13 11:47:55 2010 -0700
+++ b/src/share/vm/c1x/c1x_VMEntries.hpp	Fri Jul 23 15:53:02 2010 -0700
@@ -22,19 +22,21 @@
  *
  */
 
-#ifndef _Included_com_sun_hotspot_c1x_VMEntries
-#define _Included_com_sun_hotspot_c1x_VMEntries
-
 #define CC (char*)  /*cast a literal from (const char*)*/
 #define FN_PTR(f) CAST_FROM_FN_PTR(void*, &f)
 
+#ifdef SOLARIS
+#define JNIEXPORT
+#define JNICALL
+#endif
+
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
 * Method:    RiMethod_code
 * Signature: (Ljava/lang/Object;)[B
 */
 JNIEXPORT jbyteArray JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1code
-  (JNIEnv *, jclass, jobject);
+  (JNIEnv *, jobject, jobject);
 
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
@@ -42,7 +44,7 @@
 * Signature: (Ljava/lang/Object;)I
 */
 JNIEXPORT jint JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1maxStackSize
-  (JNIEnv *, jclass, jobject);
+  (JNIEnv *, jobject, jobject);
 
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
@@ -50,7 +52,7 @@
 * Signature: (Ljava/lang/Object;)I
 */
 JNIEXPORT jint JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1maxLocals
-  (JNIEnv *, jclass, jobject);
+  (JNIEnv *, jobject, jobject);
 
 
 /*
@@ -59,7 +61,7 @@
 * Signature: (Ljava/lang/Object;)Lcom/sun/cri/ri/RiType;
 */
 JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1holder
-  (JNIEnv *, jclass, jobject);
+  (JNIEnv *, jobject, jobject);
 
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
@@ -67,7 +69,7 @@
 * Signature: (Ljava/lang/Object;)Lcom/sun/cri/ri/RiSignature;
 */
 JNIEXPORT jstring JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1signature
-  (JNIEnv *, jclass, jobject);
+  (JNIEnv *, jobject, jobject);
 
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
@@ -75,7 +77,7 @@
 * Signature: (Ljava/lang/Object;)Ljava/lang/String;
 */
 JNIEXPORT jstring JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1name
-  (JNIEnv *, jclass, jobject);
+  (JNIEnv *, jobject, jobject);
 
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
@@ -83,7 +85,7 @@
 * Signature: (Ljava/lang/String;Lcom/sun/cri/ri/RiType;)Lcom/sun/cri/ri/RiType;
 */
 JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiSignature_1lookupType
-    (JNIEnv *, jclass, jstring, jobject);
+    (JNIEnv *, jobject, jstring, jobject);
 
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
@@ -91,7 +93,7 @@
 * Signature: (Ljava/lang/Object;)Ljava/lang/String;
 */
 JNIEXPORT jstring JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiSignature_1symbolToString
-(JNIEnv *, jclass, jobject);
+(JNIEnv *, jobject, jobject);
 
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
@@ -99,7 +101,7 @@
 * Signature: (Ljava/lang/Object;)Ljava/lang/Class;
 */
 JNIEXPORT jclass JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiType_1javaClass
-(JNIEnv *, jclass, jobject);
+(JNIEnv *, jobject, jobject);
 
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
@@ -107,7 +109,7 @@
 * Signature: (Ljava/lang/Object;)Ljava/lang/String;
 */
 JNIEXPORT jstring JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiType_1name
-(JNIEnv *, jclass, jobject);
+(JNIEnv *, jobject, jobject);
 
 
 /*
@@ -116,7 +118,7 @@
 * Signature: (Ljava/lang/Object;I)Ljava/lang/Object;
 */
 JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiConstantPool_1lookupConstant
-(JNIEnv *, jclass, jobject, jint);
+(JNIEnv *, jobject, jobject, jint);
 
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
@@ -124,7 +126,7 @@
 * Signature: (Ljava/lang/Object;I)Lcom/sun/cri/ri/RiMethod;
 */
 JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiConstantPool_1lookupMethod
-(JNIEnv *, jclass, jobject, jint, jbyte);
+(JNIEnv *, jobject, jobject, jint, jbyte);
 
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
@@ -132,7 +134,7 @@
 * Signature: (Ljava/lang/Object;I)Lcom/sun/cri/ri/RiSignature;
 */
 JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiConstantPool_1lookupSignature
-(JNIEnv *, jclass, jobject, jint);
+(JNIEnv *, jobject, jobject, jint);
 
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
@@ -140,7 +142,7 @@
 * Signature: (Ljava/lang/Object;I)Lcom/sun/cri/ri/RiType;
 */
 JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiConstantPool_1lookupType
-(JNIEnv *, jclass, jobject, jint);
+(JNIEnv *, jobject, jobject, jint);
 
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
@@ -148,7 +150,7 @@
 * Signature: (Ljava/lang/Object;I)Lcom/sun/cri/ri/RiField;
 */
 JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiConstantPool_1lookupField
-(JNIEnv *, jclass, jobject, jint);
+(JNIEnv *, jobject, jobject, jint);
 
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
@@ -156,7 +158,7 @@
 * Signature: (Ljava/lang/Object;)Lcom/sun/cri/ri/RiType;
 */
 JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_findRiType
-(JNIEnv *, jclass, jobject);
+(JNIEnv *, jobject, jobject);
 
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
@@ -164,7 +166,7 @@
 * Signature: (Ljava/lang/Object;)Lcom/sun/cri/ri/RiConstantPool;
 */
 JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiRuntime_1getConstantPool
-(JNIEnv *, jclass, jobject);
+(JNIEnv *, jobject, jobject);
 
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
@@ -172,7 +174,7 @@
 * Signature: (Ljava/lang/Object;)Z
 */
 JNIEXPORT jboolean JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiType_1isArrayClass
-(JNIEnv *, jclass, jobject);
+(JNIEnv *, jobject, jobject);
 
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
@@ -180,7 +182,7 @@
 * Signature: (Ljava/lang/Object;)Z
 */
 JNIEXPORT jboolean JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiType_1isInstanceClass
-(JNIEnv *, jclass, jobject);
+(JNIEnv *, jobject, jobject);
 
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
@@ -188,7 +190,7 @@
 * Signature: (Ljava/lang/Object;)Z
 */
 JNIEXPORT jboolean JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiType_1isInterface
-(JNIEnv *, jclass, jobject);
+(JNIEnv *, jobject, jobject);
 
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
@@ -196,15 +198,15 @@
 * Signature: (Ljava/lang/Object;)I
 */
 JNIEXPORT jint JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiMethod_1accessFlags
-(JNIEnv *, jclass, jobject);
+(JNIEnv *, jobject, jobject);
 
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
 * Method:    installCode
-* Signature: (Ljava/lang/Object;[BI)V
+* Signature: (Lcom/sun/hotspot/c1x/HotSpotTargetMethod;)V
 */
 JNIEXPORT void JNICALL Java_com_sun_hotspot_c1x_VMEntries_installCode
-(JNIEnv *, jclass, jobject, jbyteArray, jint);
+(JNIEnv *, jobject, jobject);
 
 /*
 * Class:     com_sun_hotspot_c1x_VMEntries
@@ -212,10 +214,8 @@
 * Signature: ()Lcom/sun/hotspot/c1x/HotSpotVMConfig;
 */
 JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_getConfiguration
-(JNIEnv *, jclass);
+(JNIEnv *, jobject);
 
 
 extern JNINativeMethod VMEntries_methods[];
 int VMEntries_methods_count();
-
-#endif
\ No newline at end of file
--- a/src/share/vm/c1x/c1x_VMExits.cpp	Tue Jul 13 11:47:55 2010 -0700
+++ b/src/share/vm/c1x/c1x_VMExits.cpp	Fri Jul 23 15:53:02 2010 -0700
@@ -24,39 +24,64 @@
 
 # include "incls/_precompiled.incl"
 # include "incls/_c1x_VMExits.cpp.incl"
+/*
+jobject         OopCache::handles = NULL;
+jobject         OopCache::mirrors = NULL;
+int             OopCache::capacity = 0;
+int             OopCache::used = 0;
 
-KlassHandle VMExits::_vmExitsKlass;
+void initialize() {
+
+}
+  static Handle mirror(oop internal_object);
+  static Handle resolve(oop mirror);
+
+*/
+KlassHandle     VMExits::_vmExitsKlass;
+Handle          VMExits::_vmExitsObject;
 
 KlassHandle &VMExits::vmExitsKlass() {
-
-  //if (_vmExitsKlass.is_null()) {
-    Handle nullh;
-    _vmExitsKlass = SystemDictionary::resolve_or_null(vmSymbols::com_sun_hotspot_c1x_VMExits(), SystemDictionary::java_system_loader(), nullh, Thread::current());
+  if (_vmExitsKlass.is_null()) {
+    _vmExitsKlass = SystemDictionary::resolve_or_null(vmSymbols::com_sun_hotspot_c1x_VMExits(), SystemDictionary::java_system_loader(), NULL, Thread::current());
     if (_vmExitsKlass.is_null()) {
       fatal("Could not find class com.sun.hotspot.c1x.VMExits");
     }
-  //}
+  }
   return _vmExitsKlass;
 }
 
+Handle &VMExits::instance() {
+  if (_vmExitsObject.is_null()) {
+    KlassHandle compiler_klass = SystemDictionary::resolve_or_null(vmSymbols::com_sun_hotspot_c1x_Compiler(), SystemDictionary::java_system_loader(), NULL, Thread::current());
+    JavaValue result(T_OBJECT);
+    JavaCallArguments args;
+    JavaCalls::call_static(&result, compiler_klass(), vmSymbols::getVMExits_name(), vmSymbols::getVMExits_signature(), &args, Thread::current());
+    check_pending_exception("Couldn't get VMExits");
+    oop res = (oop)result.get_jobject();
+    _vmExitsObject = res;
+  }
+  return _vmExitsObject;
+}
+
 void VMExits::compileMethod(oop method, int entry_bci) {
   assert(method != NULL, "just checking");
   JavaValue result(T_VOID);
   JavaCallArguments args;
+  args.push_oop(instance());
   args.push_oop(method);
   args.push_int(entry_bci);
-  JavaCalls::call_static(&result, vmExitsKlass(), vmSymbols::compileMethod_name(), vmSymbols::compileMethod_signature(), &args, Thread::current());
+  JavaCalls::call_interface(&result, vmExitsKlass(), vmSymbols::compileMethod_name(), vmSymbols::compileMethod_signature(), &args, Thread::current());
+  check_pending_exception("Error while calling compileMethod");
 }
 
 oop VMExits::createRiMethod(methodOop m) {
   assert(m != NULL, "just checking");
   JavaValue result(T_OBJECT);
   JavaCallArguments args;
+  args.push_oop(instance());
   args.push_oop(m);
-  JavaCalls::call_static(&result, vmExitsKlass(), vmSymbols::createRiMethod_name(), vmSymbols::createRiMethod_signature(), &args, Thread::current());
-  if(Thread::current()->pending_exception() != NULL) {
-    tty->print_cr("exc pending");
-  }
+  JavaCalls::call_interface(&result, vmExitsKlass(), vmSymbols::createRiMethod_name(), vmSymbols::createRiMethod_signature(), &args, Thread::current());
+  check_pending_exception("Error while calling createRiMethod");
   return (oop)result.get_jobject();
 }
 
@@ -64,11 +89,13 @@
   assert(field_holder != NULL && field_name != NULL && field_type != NULL, "just checking");
   JavaValue result(T_OBJECT);
   JavaCallArguments args;
+  args.push_oop(instance());
   args.push_oop(field_holder);
   args.push_oop(field_name);
   args.push_oop(field_type);
   args.push_int(index);
-  JavaCalls::call_static(&result, vmExitsKlass(), vmSymbols::createRiField_name(), vmSymbols::createRiField_signature(), &args, Thread::current());
+  JavaCalls::call_interface(&result, vmExitsKlass(), vmSymbols::createRiField_name(), vmSymbols::createRiField_signature(), &args, Thread::current());
+  check_pending_exception("Error while calling createRiField");
   return (oop)result.get_jobject();
 }
 
@@ -76,26 +103,32 @@
   assert(k != NULL, "just checking");
   JavaValue result(T_OBJECT);
   JavaCallArguments args;
+  args.push_oop(instance());
   args.push_oop(k);
-  JavaCalls::call_static(&result, vmExitsKlass(), vmSymbols::createRiType_name(), vmSymbols::createRiType_signature(), &args, Thread::current());
+  JavaCalls::call_interface(&result, vmExitsKlass(), vmSymbols::createRiType_name(), vmSymbols::createRiType_signature(), &args, Thread::current());
+  check_pending_exception("Error while calling createRiType");
   return (oop)result.get_jobject();
 }
 
 oop VMExits::createRiTypePrimitive(int basic_type) {
   JavaValue result(T_OBJECT);
   JavaCallArguments args;
+  args.push_oop(instance());
   args.push_int(basic_type);
-  JavaCalls::call_static(&result, vmExitsKlass(), vmSymbols::createRiTypePrimitive_name(), vmSymbols::createRiTypePrimitive_signature(), &args, Thread::current());
+  JavaCalls::call_interface(&result, vmExitsKlass(), vmSymbols::createRiTypePrimitive_name(), vmSymbols::createRiTypePrimitive_signature(), &args, Thread::current());
+  check_pending_exception("Error while calling createRiTypePrimitive");
   return (oop)result.get_jobject();
 }
 
 oop VMExits::createRiTypeUnresolved(symbolOop name, klassOop accessor) {
-  assert(name != NULL && accessor != NULL, "just checking");
+//  assert(name != NULL && accessor != NULL, "just checking");
   JavaValue result(T_OBJECT);
   JavaCallArguments args;
+  args.push_oop(instance());
   args.push_oop(name);
   args.push_oop(accessor);
-  JavaCalls::call_static(&result, vmExitsKlass(), vmSymbols::createRiTypeUnresolved_name(), vmSymbols::createRiTypeUnresolved_signature(), &args, Thread::current());
+  JavaCalls::call_interface(&result, vmExitsKlass(), vmSymbols::createRiTypeUnresolved_name(), vmSymbols::createRiTypeUnresolved_signature(), &args, Thread::current());
+  check_pending_exception("Error while calling createRiTypeUnresolved");
   return (oop)result.get_jobject();
 }
 
@@ -103,8 +136,10 @@
   assert(cp != NULL, "just checking");
   JavaValue result(T_OBJECT);
   JavaCallArguments args;
+  args.push_oop(instance());
   args.push_oop(cp);
-  JavaCalls::call_static(&result, vmExitsKlass(), vmSymbols::createRiConstantPool_name(), vmSymbols::createRiConstantPool_signature(), &args, Thread::current());
+  JavaCalls::call_interface(&result, vmExitsKlass(), vmSymbols::createRiConstantPool_name(), vmSymbols::createRiConstantPool_signature(), &args, Thread::current());
+  check_pending_exception("Error while calling createRiConstantPool");
   return (oop)result.get_jobject();
 }
 
@@ -112,16 +147,20 @@
   assert(symbol != NULL, "just checking");
   JavaValue result(T_OBJECT);
   JavaCallArguments args;
+  args.push_oop(instance());
   args.push_oop(symbol);
-  JavaCalls::call_static(&result, vmExitsKlass(), vmSymbols::createRiSignature_name(), vmSymbols::createRiSignature_signature(), &args, Thread::current());
+  JavaCalls::call_interface(&result, vmExitsKlass(), vmSymbols::createRiSignature_name(), vmSymbols::createRiSignature_signature(), &args, Thread::current());
+  check_pending_exception("Error while calling createRiSignature");
   return (oop)result.get_jobject();
 }
 
 oop VMExits::createCiConstantInt(jint value) {
   JavaValue result(T_OBJECT);
   JavaCallArguments args;
+  args.push_oop(instance());
   args.push_int(value);
-  JavaCalls::call_static(&result, vmExitsKlass(), vmSymbols::createCiConstantInt_name(), vmSymbols::createCiConstantInt_signature(), &args, Thread::current());
+  JavaCalls::call_interface(&result, vmExitsKlass(), vmSymbols::createCiConstantInt_name(), vmSymbols::createCiConstantInt_signature(), &args, Thread::current());
+  check_pending_exception("Error while calling createCiConstantInt");
   return (oop)result.get_jobject();
 
 }
@@ -129,8 +168,10 @@
 oop VMExits::createCiConstantLong(jlong value) {
   JavaValue result(T_OBJECT);
   JavaCallArguments args;
+  args.push_oop(instance());
   args.push_long(value);
-  JavaCalls::call_static(&result, vmExitsKlass(), vmSymbols::createCiConstantLong_name(), vmSymbols::createCiConstantLong_signature(), &args, Thread::current());
+  JavaCalls::call_interface(&result, vmExitsKlass(), vmSymbols::createCiConstantLong_name(), vmSymbols::createCiConstantLong_signature(), &args, Thread::current());
+  check_pending_exception("Error while calling createCiConstantFloat");
   return (oop)result.get_jobject();
 
 }
@@ -138,8 +179,10 @@
 oop VMExits::createCiConstantFloat(jfloat value) {
   JavaValue result(T_OBJECT);
   JavaCallArguments args;
+  args.push_oop(instance());
   args.push_float(value);
-  JavaCalls::call_static(&result, vmExitsKlass(), vmSymbols::createCiConstantFloat_name(), vmSymbols::createCiConstantFloat_signature(), &args, Thread::current());
+  JavaCalls::call_interface(&result, vmExitsKlass(), vmSymbols::createCiConstantFloat_name(), vmSymbols::createCiConstantFloat_signature(), &args, Thread::current());
+  check_pending_exception("Error while calling createCiConstantFloat");
   return (oop)result.get_jobject();
 
 }
@@ -147,15 +190,19 @@
 oop VMExits::createCiConstantDouble(jdouble value) {
   JavaValue result(T_OBJECT);
   JavaCallArguments args;
+  args.push_oop(instance());
   args.push_double(value);
-  JavaCalls::call_static(&result, vmExitsKlass(), vmSymbols::createCiConstantDouble_name(), vmSymbols::createCiConstantDouble_signature(), &args, Thread::current());
+  JavaCalls::call_interface(&result, vmExitsKlass(), vmSymbols::createCiConstantDouble_name(), vmSymbols::createCiConstantDouble_signature(), &args, Thread::current());
+  check_pending_exception("Error while calling createCiConstantDouble");
   return (oop)result.get_jobject();
 }
 
 oop VMExits::createCiConstantObject(oop value) {
   JavaValue result(T_OBJECT);
   JavaCallArguments args;
+  args.push_oop(instance());
   args.push_oop(value);
-  JavaCalls::call_static(&result, vmExitsKlass(), vmSymbols::createCiConstantObject_name(), vmSymbols::createCiConstantObject_signature(), &args, Thread::current());
+  JavaCalls::call_interface(&result, vmExitsKlass(), vmSymbols::createCiConstantObject_name(), vmSymbols::createCiConstantObject_signature(), &args, Thread::current());
+  check_pending_exception("Error while calling createCiConstantObject");
   return (oop)result.get_jobject();
 }
--- a/src/share/vm/c1x/c1x_VMExits.hpp	Tue Jul 13 11:47:55 2010 -0700
+++ b/src/share/vm/c1x/c1x_VMExits.hpp	Fri Jul 23 15:53:02 2010 -0700
@@ -21,17 +21,37 @@
  * have any questions.
  *
  */
+/*
+class OopCache : public AllStatic {
 
+private:
+  static Handle* handles;
+  static Handle* mirrors;
+  static int capacity;
+  static int used;
+
+public:
+  static void initialize();
+  static Handle mirror(oop internal_object);
+  static Handle resolve(oop mirror);
+
+};
+*/
 class VMExits : public AllStatic {
 
 private:
 
   static KlassHandle _vmExitsKlass;
+  static Handle _vmExitsObject;
 
 public:
 
   static KlassHandle& vmExitsKlass();
+  static Handle& instance();
+
+
   static void compileMethod(oop method, int entry_bci);
+
   static oop createRiMethod(methodOop m);
   static oop createRiField(oop field_holder, symbolOop field_name, oop field_type, int index);
   static oop createRiType(klassOop k);
@@ -44,4 +64,11 @@
   static oop createCiConstantDouble(jdouble value);
   static oop createCiConstantObject(oop value);
   static oop createRiTypePrimitive(int basic_type);
-};
\ No newline at end of file
+};
+
+inline void check_pending_exception(const char* message) {
+  if (Thread::current()->has_pending_exception()) {
+    Thread::current()->pending_exception()->print();
+    fatal(message);
+  }
+}
--- a/src/share/vm/classfile/vmSymbols.hpp	Tue Jul 13 11:47:55 2010 -0700
+++ b/src/share/vm/classfile/vmSymbols.hpp	Fri Jul 23 15:53:02 2010 -0700
@@ -276,6 +276,9 @@
   template(createCiConstantDouble_signature,          "(D)Lcom/sun/cri/ci/CiConstant;")                                 \
   template(createCiConstantObject_name,               "createCiConstantObject")                                         \
   template(createCiConstantObject_signature,          "(Ljava/lang/Object;)Lcom/sun/cri/ci/CiConstant;")                \
+  template(com_sun_hotspot_c1x_Compiler,              "com/sun/hotspot/c1x/Compiler")                                   \
+  template(getVMExits_name,                           "getVMExits")                                                     \
+  template(getVMExits_signature,                      "()Lcom/sun/hotspot/c1x/VMExits;")                                \
                                                                                                                         \
   /* common method and field names */                                                             \
   template(object_initializer_name,                   "<init>")                                   \
--- a/src/share/vm/includeDB_compiler1	Tue Jul 13 11:47:55 2010 -0700
+++ b/src/share/vm/includeDB_compiler1	Fri Jul 23 15:53:02 2010 -0700
@@ -452,9 +452,13 @@
 c1x_Compiler.cpp                        c1x_VMExits.hpp
 c1x_Compiler.cpp                        c1x_VMEntries.hpp
 
+c1x_VMEntries.hpp                       jni.h
+
 c1x_VMEntries.cpp                       c1x_VMEntries.hpp
 c1x_VMEntries.cpp                       c1x_Compiler.hpp
 c1x_VMEntries.cpp                       c1x_VMExits.hpp
+c1x_VMEntries.cpp                       oopFactory.hpp
+c1x_VMEntries.cpp                       c1_Runtime1.hpp
 
 c1x_VMExits.hpp                	        systemDictionary.hpp
 
--- a/src/share/vm/runtime/javaCalls.cpp	Tue Jul 13 11:47:55 2010 -0700
+++ b/src/share/vm/runtime/javaCalls.cpp	Fri Jul 23 15:53:02 2010 -0700
@@ -175,6 +175,23 @@
   }
 }
 
+// ============ Interface calls ============
+
+void JavaCalls::call_interface(JavaValue* result, KlassHandle spec_klass, symbolHandle name, symbolHandle signature, JavaCallArguments* args, TRAPS) {
+  CallInfo callinfo;
+  Handle receiver = args->receiver();
+  KlassHandle recvrKlass(THREAD, receiver.is_null() ? (klassOop)NULL : receiver->klass());
+  LinkResolver::resolve_interface_call(
+          callinfo, receiver, recvrKlass, spec_klass, name, signature,
+          KlassHandle(), false, true, CHECK);
+  methodHandle method = callinfo.selected_method();
+  assert(method.not_null(), "should have thrown exception");
+
+  // Invoke the method
+  JavaCalls::call(result, method, args, CHECK);
+}
+
+
 // ============ Virtual calls ============
 
 void JavaCalls::call_virtual(JavaValue* result, KlassHandle spec_klass, symbolHandle name, symbolHandle signature, JavaCallArguments* args, TRAPS) {
--- a/src/share/vm/runtime/javaCalls.hpp	Tue Jul 13 11:47:55 2010 -0700
+++ b/src/share/vm/runtime/javaCalls.hpp	Fri Jul 23 15:53:02 2010 -0700
@@ -172,6 +172,12 @@
   static void call_special(JavaValue* result, Handle receiver, KlassHandle klass, symbolHandle name, symbolHandle signature, Handle arg1, TRAPS);
   static void call_special(JavaValue* result, Handle receiver, KlassHandle klass, symbolHandle name, symbolHandle signature, Handle arg1, Handle arg2, TRAPS);
 
+  // interface call
+  // ------------
+
+  // The receiver must be first oop in argument list
+  static void call_interface(JavaValue* result, KlassHandle spec_klass, symbolHandle name, symbolHandle signature, JavaCallArguments* args, TRAPS);
+
   // virtual call
   // ------------