Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalCompiler.cpp @ 13086:096c224171c4
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 20 Nov 2013 00:10:38 +0100 |
parents | f6c511451e4a |
children | 77fbf02f701c |
comparison
equal
deleted
inserted
replaced
12782:92b7ec34ddfa | 13086:096c224171c4 |
---|---|
178 return; | 178 return; |
179 } | 179 } |
180 | 180 |
181 assert(_initialized, "must already be initialized"); | 181 assert(_initialized, "must already be initialized"); |
182 ResourceMark rm; | 182 ResourceMark rm; |
183 JavaThread::current()->set_is_compiling(true); | |
184 Handle holder = GraalCompiler::createHotSpotResolvedObjectType(method, CHECK); | 183 Handle holder = GraalCompiler::createHotSpotResolvedObjectType(method, CHECK); |
185 VMToCompiler::compileMethod(method(), holder, entry_bci, blocking); | 184 VMToCompiler::compileMethod(method(), holder, entry_bci, blocking); |
186 JavaThread::current()->set_is_compiling(false); | |
187 } | 185 } |
188 | 186 |
189 // Compilation entry point for methods | 187 // Compilation entry point for methods |
190 void GraalCompiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci) { | 188 void GraalCompiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci) { |
191 ShouldNotReachHere(); | 189 ShouldNotReachHere(); |
232 Symbol* klass_name = NULL; | 230 Symbol* klass_name = NULL; |
233 { | 231 { |
234 // We have to lock the cpool to keep the oop from being resolved | 232 // We have to lock the cpool to keep the oop from being resolved |
235 // while we are accessing it. But we must release the lock before | 233 // while we are accessing it. But we must release the lock before |
236 // calling up into Java. | 234 // calling up into Java. |
237 oop cplock = cp->lock(); | 235 MonitorLockerEx ml(cp->lock()); |
238 ObjectLocker ol(cplock, THREAD, cplock != NULL); | |
239 constantTag tag = cp->tag_at(index); | 236 constantTag tag = cp->tag_at(index); |
240 if (tag.is_klass()) { | 237 if (tag.is_klass()) { |
241 // The klass has been inserted into the constant pool | 238 // The klass has been inserted into the constant pool |
242 // very recently. | 239 // very recently. |
243 return GraalCompiler::get_JavaType(cp->resolved_klass_at(index), CHECK_NH); | 240 return GraalCompiler::get_JavaType(cp->resolved_klass_at(index), CHECK_NH); |