diff src/share/vm/c1x/c1x_Compiler.hpp @ 1429:abc670a709dc

* -XX:TraceC1X=0...5 controls the native c1x tracing * -Dc1x.debug=true turns on the logging proxies and lots of log output on the java side * provide more information about types to the compiler (type hierarchy, etc) * provide exception handler tables to the compiler * add exception handlers to the nmethod * correct implementation of ExceptionObject * exception handling/unwinding entry points * modified versions of handle/unwind exception stubs using standard calling conventions * exception throwing * implicit null pointer exception, implicit div by 0 exception * arraystore/classcast/arrayindex exceptions * checkcast implementation * newarray, anewarray, multinewarray implementation * correct new instance initialization * access to java class mirrors (for ldc) * unresolved methods * class resolving - class patching (asssembly prototype copying)
author Lukas Stadler <lukas.stadler@oracle.com>
date Tue, 31 Aug 2010 22:13:30 -0700
parents 695451afc619
children efba53f86c4f
line wrap: on
line diff
--- a/src/share/vm/c1x/c1x_Compiler.hpp	Thu Aug 19 14:34:52 2010 -0700
+++ b/src/share/vm/c1x/c1x_Compiler.hpp	Tue Aug 31 22:13:30 2010 -0700
@@ -26,11 +26,16 @@
 
 private:
 
-  bool _initialized;
+  bool                  _initialized;
+
+  static C1XCompiler*   _instance;
 
 public:
 
-  C1XCompiler() { _initialized = false; }
+  C1XCompiler();
+
+  static C1XCompiler* instance() { return _instance; }
+
 
   virtual const char* name() { return "C1X"; }
 
@@ -54,13 +59,8 @@
   static oop get_RiType(ciType *klass, klassOop accessor, TRAPS);
   static oop get_RiField(ciField *ciField, TRAPS);
 
-/*
-  static oop get_RiMethod(ciMethod *ciMethod, TRAPS);
-  static oop get_RiType(klassOop klass, TRAPS);
-  static oop get_RiMethod(methodOop method, TRAPS);
-  static oop get_unresolved_RiType(oop klass, klassOop accessingType, TRAPS);
-  static oop get_RiConstantPool(constantPoolOop cpOop, TRAPS);
-*/
+  static oop createHotSpotTypeResolved(KlassHandle klass, Handle name, TRAPS);
+
 };
 
 // Tracing macros
@@ -71,11 +71,12 @@
 #define IF_TRACE_C1X_4 if (TraceC1X >= 4) 
 #define IF_TRACE_C1X_5 if (TraceC1X >= 5) 
 
-#define TRACE_C1X_1 if (TraceC1X >= 1) tty->print("TraceC1X-1: "); if (TraceC1X >= 1) tty->print_cr
-#define TRACE_C1X_2 if (TraceC1X >= 2) tty->print("   TraceC1X-2: "); if (TraceC1X >= 2) tty->print_cr
-#define TRACE_C1X_3 if (TraceC1X >= 3) tty->print("      TraceC1X-3: "); if (TraceC1X >= 3) tty->print_cr
-#define TRACE_C1X_4 if (TraceC1X >= 4) tty->print("         TraceC1X-4: "); if (TraceC1X >= 4) tty->print_cr
-#define TRACE_C1X_5 if (TraceC1X >= 5) tty->print("            TraceC1X-5: "); if (TraceC1X >= 5) tty->print_cr
+// using commas to keep one-instruction semantics
+#define TRACE_C1X_1 if (TraceC1X >= 1 && (tty->print("TraceC1X-1: "), true)) tty->print_cr
+#define TRACE_C1X_2 if (TraceC1X >= 2 && (tty->print("   TraceC1X-2: "), true)) tty->print_cr
+#define TRACE_C1X_3 if (TraceC1X >= 3 && (tty->print("      TraceC1X-3: "), true)) tty->print_cr
+#define TRACE_C1X_4 if (TraceC1X >= 4 && (tty->print("         TraceC1X-4: "), true)) tty->print_cr
+#define TRACE_C1X_5 if (TraceC1X >= 5 && (tty->print("            TraceC1X-5: "), true)) tty->print_cr