Mercurial > hg > graal-compiler
comparison src/share/vm/code/debugInfoRec.cpp @ 4583:597bc897257d
Made DebugInformationRecorder::describe_scope() take both a methodHandle _and_ a ciMethod* parameter to avoid creating handles in scopes where it is not allowed.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 13 Feb 2012 23:15:53 +0100 |
parents | 0e8a2a629afb |
children | 51111665eda6 |
comparison
equal
deleted
inserted
replaced
4582:b24386206122 | 4583:597bc897257d |
---|---|
278 | 278 |
279 | 279 |
280 // must call add_safepoint before: it sets PcDesc and this routine uses | 280 // must call add_safepoint before: it sets PcDesc and this routine uses |
281 // the last PcDesc set | 281 // the last PcDesc set |
282 void DebugInformationRecorder::describe_scope(int pc_offset, | 282 void DebugInformationRecorder::describe_scope(int pc_offset, |
283 methodHandle method, | 283 methodHandle methodH, |
284 ciMethod* method, | |
284 int bci, | 285 int bci, |
285 bool reexecute, | 286 bool reexecute, |
286 bool rethrow_exception, | 287 bool rethrow_exception, |
287 bool is_method_handle_invoke, | 288 bool is_method_handle_invoke, |
288 bool return_oop, | 289 bool return_oop, |
305 | 306 |
306 // serialize sender stream offest | 307 // serialize sender stream offest |
307 stream()->write_int(sender_stream_offset); | 308 stream()->write_int(sender_stream_offset); |
308 | 309 |
309 // serialize scope | 310 // serialize scope |
310 jobject method_enc = JNIHandles::make_local(Thread::current(), method()); | 311 jobject method_enc; |
312 if (method != NULL) { | |
313 method_enc = method->constant_encoding(); | |
314 } else if (methodH.not_null()) { | |
315 method_enc = JNIHandles::make_local(Thread::current(), methodH()); | |
316 } else { | |
317 method_enc = NULL; | |
318 } | |
311 stream()->write_int(oop_recorder()->find_index(method_enc)); | 319 stream()->write_int(oop_recorder()->find_index(method_enc)); |
312 stream()->write_bci(bci); | 320 stream()->write_bci(bci); |
313 assert(method == NULL || | 321 assert(method == NULL || |
314 (method->is_native() && bci == 0) || | 322 (method->is_native() && bci == 0) || |
315 (!method->is_native() && 0 <= bci && bci < method->code_size()) || | 323 (!method->is_native() && 0 <= bci && bci < method->code_size()) || |
324 bci == -1, "illegal bci"); | |
325 assert(methodH.is_null() || | |
326 (methodH->is_native() && bci == 0) || | |
327 (!methodH->is_native() && 0 <= bci && bci < methodH->code_size()) || | |
316 bci == -1, "illegal bci"); | 328 bci == -1, "illegal bci"); |
317 | 329 |
318 // serialize the locals/expressions/monitors | 330 // serialize the locals/expressions/monitors |
319 stream()->write_int((intptr_t) locals); | 331 stream()->write_int((intptr_t) locals); |
320 stream()->write_int((intptr_t) expressions); | 332 stream()->write_int((intptr_t) expressions); |