Mercurial > hg > graal-jvmci-8
comparison c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodUnresolved.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 | |
children | efba53f86c4f |
comparison
equal
deleted
inserted
replaced
1428:695451afc619 | 1429:abc670a709dc |
---|---|
1 /* | |
2 * Copyright (c) 2010 Sun Microsystems, Inc. All rights reserved. | |
3 * | |
4 * Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is | |
5 * described in this document. In particular, and without limitation, these intellectual property rights may include one | |
6 * or more of the U.S. patents listed at http://www.sun.com/patents and one or more additional patents or pending patent | |
7 * applications in the U.S. and in other countries. | |
8 * | |
9 * U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard | |
10 * license agreement and applicable provisions of the FAR and its supplements. | |
11 * | |
12 * Use is subject to license terms. Sun, Sun Microsystems, the Sun logo, Java and Solaris are trademarks or registered | |
13 * trademarks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks are used under license and | |
14 * are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries. | |
15 * | |
16 * UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd. | |
17 */ | |
18 package com.sun.hotspot.c1x; | |
19 | |
20 import com.sun.cri.ci.*; | |
21 import com.sun.cri.ri.*; | |
22 | |
23 /** | |
24 * Implementation of RiMethod for unresolved HotSpot methods. | |
25 * | |
26 * @author Lukas Stadler | |
27 */ | |
28 public class HotSpotMethodUnresolved implements HotSpotMethod { | |
29 private final String name; | |
30 private final RiType holder; | |
31 private final RiSignature signature; | |
32 | |
33 public HotSpotMethodUnresolved(String name, String signature, RiType holder) { | |
34 this.name = name; | |
35 this.holder = holder; | |
36 this.signature = new HotSpotSignature(signature); | |
37 } | |
38 | |
39 @Override | |
40 public String name() { | |
41 return name; | |
42 } | |
43 | |
44 @Override | |
45 public RiType holder() { | |
46 return holder; | |
47 } | |
48 | |
49 @Override | |
50 public RiSignature signature() { | |
51 return signature; | |
52 } | |
53 | |
54 @Override | |
55 public boolean isResolved() { | |
56 return false; | |
57 } | |
58 | |
59 @Override | |
60 public byte[] code() { | |
61 throw unresolved("code"); | |
62 } | |
63 | |
64 @Override | |
65 public RiMethodProfile methodData() { | |
66 throw unresolved("methodData"); | |
67 } | |
68 | |
69 @Override | |
70 public String jniSymbol() { | |
71 throw unresolved("jniSymbol"); | |
72 } | |
73 | |
74 @Override | |
75 public int maxLocals() { | |
76 throw unresolved("maxLocals"); | |
77 } | |
78 | |
79 @Override | |
80 public int maxStackSize() { | |
81 throw unresolved("maxStackSize"); | |
82 } | |
83 | |
84 @Override | |
85 public boolean hasBalancedMonitors() { | |
86 throw unresolved("hasBalancedMonitors"); | |
87 } | |
88 | |
89 @Override | |
90 public int accessFlags() { | |
91 throw unresolved("accessFlags"); | |
92 } | |
93 | |
94 @Override | |
95 public boolean isLeafMethod() { | |
96 throw unresolved("isLeafMethod"); | |
97 } | |
98 | |
99 @Override | |
100 public boolean isClassInitializer() { | |
101 return "<clinit>".equals(name); | |
102 } | |
103 | |
104 @Override | |
105 public boolean isConstructor() { | |
106 return "<init>".equals(name); | |
107 } | |
108 | |
109 @Override | |
110 public boolean isOverridden() { | |
111 throw unresolved("isOverridden"); | |
112 } | |
113 | |
114 @Override | |
115 public Object liveness(int bci) { | |
116 throw unresolved("liveness"); | |
117 } | |
118 | |
119 @Override | |
120 public boolean canBeStaticallyBound() { | |
121 throw unresolved("canBeStaticallyBound"); | |
122 } | |
123 | |
124 @Override | |
125 public RiExceptionHandler[] exceptionHandlers() { | |
126 throw unresolved("exceptionHandlers"); | |
127 } | |
128 | |
129 private CiUnresolvedException unresolved(String operation) { | |
130 return new CiUnresolvedException(operation + " not defined for unresolved method " + name); | |
131 } | |
132 | |
133 } |