Mercurial > hg > graal-jvmci-8
comparison src/share/vm/interpreter/interpreter.cpp @ 13010:bd3237e0e18d
8026328: Setting a breakpoint on invokedynamic crashes the JVM
Reviewed-by: jrose, roland
author | twisti |
---|---|
date | Thu, 24 Oct 2013 16:23:07 -0700 |
parents | b800986664f4 |
children | 096c224171c4 78bbf4d43a14 |
comparison
equal
deleted
inserted
replaced
12968:97d400662426 | 13010:bd3237e0e18d |
---|---|
327 | 327 |
328 | 328 |
329 //------------------------------------------------------------------------------------------------------------------------ | 329 //------------------------------------------------------------------------------------------------------------------------ |
330 // Deoptimization support | 330 // Deoptimization support |
331 | 331 |
332 // If deoptimization happens, this function returns the point of next bytecode to continue execution | 332 /** |
333 * If a deoptimization happens, this function returns the point of next bytecode to continue execution. | |
334 */ | |
333 address AbstractInterpreter::deopt_continue_after_entry(Method* method, address bcp, int callee_parameters, bool is_top_frame) { | 335 address AbstractInterpreter::deopt_continue_after_entry(Method* method, address bcp, int callee_parameters, bool is_top_frame) { |
334 assert(method->contains(bcp), "just checkin'"); | 336 assert(method->contains(bcp), "just checkin'"); |
335 Bytecodes::Code code = Bytecodes::java_code_at(method, bcp); | 337 |
338 // Get the original and rewritten bytecode. | |
339 Bytecodes::Code code = Bytecodes::java_code_at(method, bcp); | |
336 assert(!Interpreter::bytecode_should_reexecute(code), "should not reexecute"); | 340 assert(!Interpreter::bytecode_should_reexecute(code), "should not reexecute"); |
337 int bci = method->bci_from(bcp); | 341 |
338 int length = -1; // initial value for debugging | 342 const int bci = method->bci_from(bcp); |
343 | |
339 // compute continuation length | 344 // compute continuation length |
340 length = Bytecodes::length_at(method, bcp); | 345 const int length = Bytecodes::length_at(method, bcp); |
346 | |
341 // compute result type | 347 // compute result type |
342 BasicType type = T_ILLEGAL; | 348 BasicType type = T_ILLEGAL; |
343 | 349 |
344 switch (code) { | 350 switch (code) { |
345 case Bytecodes::_invokevirtual : | 351 case Bytecodes::_invokevirtual : |
391 | 397 |
392 // return entry point for computed continuation state & bytecode length | 398 // return entry point for computed continuation state & bytecode length |
393 return | 399 return |
394 is_top_frame | 400 is_top_frame |
395 ? Interpreter::deopt_entry (as_TosState(type), length) | 401 ? Interpreter::deopt_entry (as_TosState(type), length) |
396 : Interpreter::return_entry(as_TosState(type), length); | 402 : Interpreter::return_entry(as_TosState(type), length, code); |
397 } | 403 } |
398 | 404 |
399 // If deoptimization happens, this function returns the point where the interpreter reexecutes | 405 // If deoptimization happens, this function returns the point where the interpreter reexecutes |
400 // the bytecode. | 406 // the bytecode. |
401 // Note: Bytecodes::_athrow is a special case in that it does not return | 407 // Note: Bytecodes::_athrow is a special case in that it does not return |