Mercurial > hg > graal-compiler
comparison c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMExitsNative.java @ 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 | 760213a60e8b |
children | efba53f86c4f |
comparison
equal
deleted
inserted
replaced
1428:695451afc619 | 1429:abc670a709dc |
---|---|
32 public class VMExitsNative implements VMExits { | 32 public class VMExitsNative implements VMExits { |
33 | 33 |
34 @Override | 34 @Override |
35 public void compileMethod(long methodVmId, String name, int entry_bci) { | 35 public void compileMethod(long methodVmId, String name, int entry_bci) { |
36 try { | 36 try { |
37 Logger.info("compiling " + name + " (" + methodVmId + ")"); | 37 Logger.info("compiling " + name + " (0x" + Long.toHexString(methodVmId) + ")"); |
38 Compiler compiler = Compiler.getInstance(); | 38 Compiler compiler = Compiler.getInstance(); |
39 HotSpotMethod riMethod = new HotSpotMethod(methodVmId, name); | 39 HotSpotMethodResolved riMethod = new HotSpotMethodResolved(methodVmId, name); |
40 CiResult result = compiler.getCompiler().compileMethod(riMethod, null); | 40 CiResult result = compiler.getCompiler().compileMethod(riMethod, null); |
41 | 41 |
42 if (result.bailout() != null) { | 42 if (result.bailout() != null) { |
43 StringWriter out = new StringWriter(); | 43 StringWriter out = new StringWriter(); |
44 result.bailout().printStackTrace(new PrintWriter(out)); | 44 result.bailout().printStackTrace(new PrintWriter(out)); |
53 Logger.info("Compilation interrupted:\n" + out.toString()); | 53 Logger.info("Compilation interrupted:\n" + out.toString()); |
54 } | 54 } |
55 } | 55 } |
56 | 56 |
57 @Override | 57 @Override |
58 public RiMethod createRiMethod(long vmId, String name) { | 58 public RiMethod createRiMethodResolved(long vmId, String name) { |
59 RiMethod m = new HotSpotMethod(vmId, name); | 59 return new HotSpotMethodResolved(vmId, name); |
60 return m; | 60 } |
61 | |
62 @Override | |
63 public RiMethod createRiMethodUnresolved(String name, String signature, RiType holder) { | |
64 return new HotSpotMethodUnresolved(name, signature, holder); | |
61 } | 65 } |
62 | 66 |
63 @Override | 67 @Override |
64 public RiSignature createRiSignature(String signature) { | 68 public RiSignature createRiSignature(String signature) { |
65 return new HotSpotSignature(signature); | 69 return new HotSpotSignature(signature); |
70 return new HotSpotField(holder, name, type, offset); | 74 return new HotSpotField(holder, name, type, offset); |
71 } | 75 } |
72 | 76 |
73 @Override | 77 @Override |
74 public RiType createRiType(long vmId, String name) { | 78 public RiType createRiType(long vmId, String name) { |
75 return new HotSpotTypeResolved(vmId, name); | 79 throw new RuntimeException("not implemented"); |
76 } | 80 } |
77 | 81 |
78 @Override | 82 @Override |
79 public RiType createRiTypePrimitive(int basicType) { | 83 public RiType createRiTypePrimitive(int basicType) { |
80 CiKind kind = null; | 84 CiKind kind = null; |