Mercurial > hg > graal-jvmci-8
comparison c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotTargetMethod.java @ 2284:569d3fe7d65c
non-static VMEntries and VMExits, CompilationServer simplifications
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Thu, 07 Apr 2011 15:32:25 +0200 |
parents | 3c0a889a176b |
children |
comparison
equal
deleted
inserted
replaced
2282:0309d394eb5f | 2284:569d3fe7d65c |
---|---|
38 public final String name; // used only for stubs | 38 public final String name; // used only for stubs |
39 | 39 |
40 public final Site[] sites; | 40 public final Site[] sites; |
41 public final ExceptionHandler[] exceptionHandlers; | 41 public final ExceptionHandler[] exceptionHandlers; |
42 | 42 |
43 private HotSpotTargetMethod(HotSpotMethodResolved method, CiTargetMethod targetMethod) { | 43 private HotSpotTargetMethod(Compiler compiler, HotSpotMethodResolved method, CiTargetMethod targetMethod) { |
44 super(compiler); | |
44 this.method = method; | 45 this.method = method; |
45 this.targetMethod = targetMethod; | 46 this.targetMethod = targetMethod; |
46 this.name = null; | 47 this.name = null; |
47 | 48 |
48 sites = getSortedSites(targetMethod); | 49 sites = getSortedSites(targetMethod); |
51 } else { | 52 } else { |
52 exceptionHandlers = targetMethod.exceptionHandlers.toArray(new ExceptionHandler[targetMethod.exceptionHandlers.size()]); | 53 exceptionHandlers = targetMethod.exceptionHandlers.toArray(new ExceptionHandler[targetMethod.exceptionHandlers.size()]); |
53 } | 54 } |
54 } | 55 } |
55 | 56 |
56 private HotSpotTargetMethod(CiTargetMethod targetMethod, String name) { | 57 private HotSpotTargetMethod(Compiler compiler, CiTargetMethod targetMethod, String name) { |
58 super(compiler); | |
57 this.method = null; | 59 this.method = null; |
58 this.targetMethod = targetMethod; | 60 this.targetMethod = targetMethod; |
59 this.name = name; | 61 this.name = name; |
60 | 62 |
61 sites = getSortedSites(targetMethod); | 63 sites = getSortedSites(targetMethod); |
91 } | 93 } |
92 } | 94 } |
93 return result; | 95 return result; |
94 } | 96 } |
95 | 97 |
96 public static void installMethod(HotSpotMethodResolved method, CiTargetMethod targetMethod) { | 98 public static void installMethod(Compiler compiler, HotSpotMethodResolved method, CiTargetMethod targetMethod) { |
97 Compiler.getVMEntries().installMethod(new HotSpotTargetMethod(method, targetMethod)); | 99 compiler.getVMEntries().installMethod(new HotSpotTargetMethod(compiler, method, targetMethod)); |
98 } | 100 } |
99 | 101 |
100 public static Object installStub(CiTargetMethod targetMethod, String name) { | 102 public static Object installStub(Compiler compiler, CiTargetMethod targetMethod, String name) { |
101 return Compiler.getVMEntries().installStub(new HotSpotTargetMethod(targetMethod, name)); | 103 return compiler.getVMEntries().installStub(new HotSpotTargetMethod(compiler, targetMethod, name)); |
102 } | 104 } |
103 | 105 |
104 } | 106 } |