Mercurial > hg > truffle
diff c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java @ 1420:44efca8a02d6
reformatting similar to other maxine projects (tabs, etc.)
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Tue, 13 Jul 2010 11:47:55 -0700 |
parents | 7bf6a77b9c5a |
children | 6223633ce7dd |
line wrap: on
line diff
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java Mon Jul 12 15:05:17 2010 -0700 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java Tue Jul 13 11:47:55 2010 -0700 @@ -1,22 +1,19 @@ /* - * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. + * 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. + * 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. + * 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. + * 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. + * UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd. */ package com.sun.hotspot.c1x; @@ -29,44 +26,43 @@ import com.sun.cri.xir.RiXirGenerator; /** - * + * * @author Thomas Wuerthinger - * - * Singleton class holding the instance of the C1XCompiler. + * + * Singleton class holding the instance of the C1XCompiler. * */ public class Compiler { - private static CiCompiler compiler; - - public static CiCompiler getCompiler() { - - if (compiler == null) { - compiler = createCompiler(); - } - - return compiler; - } - - - private static CiCompiler createCompiler() { + private static CiCompiler compiler; + + public static CiCompiler getCompiler() { + + if (compiler == null) { + compiler = createCompiler(); + } - final HotSpotVMConfig config = VMEntries.getConfiguration(); - final HotSpotRuntime runtime = new HotSpotRuntime(config); - final RiXirGenerator generator = new HotSpotXirGenerator(config); - final int wordSize = 8; - final int stackFrameAlignment = 8; - final int pageSize = 1024; - final RiRegisterConfig registerConfig = new HotSpotRegisterConfig(config); + return compiler; + } + + private static CiCompiler createCompiler() { + + final HotSpotVMConfig config = VMEntries.getConfiguration(); + final HotSpotRuntime runtime = new HotSpotRuntime(config); + final RiXirGenerator generator = new HotSpotXirGenerator(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); - + C1XOptions.setOptimizationLevel(3); C1XOptions.TraceBytecodeParserLevel = 4; C1XOptions.PrintCFGToFile = false; - C1XOptions.PrintAssembly = false;//true; + C1XOptions.PrintAssembly = false;// true; C1XOptions.PrintCompilation = true; return compiler; - - } + + } }