comparison src/share/vm/c1/c1_GraphBuilder.cpp @ 14518:d8041d695d19

Merged with jdk9/dev/hotspot changeset 3812c088b945
author twisti
date Tue, 11 Mar 2014 18:45:59 -0700
parents 0097301f34fa 96d2c94bbdd0
children b51e29501f30 4ca6dc0799b6
comparison
equal deleted inserted replaced
14141:f97c5ec83832 14518:d8041d695d19
2274 2274
2275 XHandlers* GraphBuilder::handle_exception(Instruction* instruction) { 2275 XHandlers* GraphBuilder::handle_exception(Instruction* instruction) {
2276 if (!has_handler() && (!instruction->needs_exception_state() || instruction->exception_state() != NULL)) { 2276 if (!has_handler() && (!instruction->needs_exception_state() || instruction->exception_state() != NULL)) {
2277 assert(instruction->exception_state() == NULL 2277 assert(instruction->exception_state() == NULL
2278 || instruction->exception_state()->kind() == ValueStack::EmptyExceptionState 2278 || instruction->exception_state()->kind() == ValueStack::EmptyExceptionState
2279 || (instruction->exception_state()->kind() == ValueStack::ExceptionState && _compilation->env()->jvmti_can_access_local_variables()), 2279 || (instruction->exception_state()->kind() == ValueStack::ExceptionState && _compilation->env()->should_retain_local_variables()),
2280 "exception_state should be of exception kind"); 2280 "exception_state should be of exception kind");
2281 return new XHandlers(); 2281 return new XHandlers();
2282 } 2282 }
2283 2283
2284 XHandlers* exception_handlers = new XHandlers(); 2284 XHandlers* exception_handlers = new XHandlers();
2365 2365
2366 if (exception_handlers->length() == 0) { 2366 if (exception_handlers->length() == 0) {
2367 // This scope and all callees do not handle exceptions, so the local 2367 // This scope and all callees do not handle exceptions, so the local
2368 // variables of this scope are not needed. However, the scope itself is 2368 // variables of this scope are not needed. However, the scope itself is
2369 // required for a correct exception stack trace -> clear out the locals. 2369 // required for a correct exception stack trace -> clear out the locals.
2370 if (_compilation->env()->jvmti_can_access_local_variables()) { 2370 if (_compilation->env()->should_retain_local_variables()) {
2371 cur_state = cur_state->copy(ValueStack::ExceptionState, cur_state->bci()); 2371 cur_state = cur_state->copy(ValueStack::ExceptionState, cur_state->bci());
2372 } else { 2372 } else {
2373 cur_state = cur_state->copy(ValueStack::EmptyExceptionState, cur_state->bci()); 2373 cur_state = cur_state->copy(ValueStack::EmptyExceptionState, cur_state->bci());
2374 } 2374 }
2375 if (prev_state != NULL) { 2375 if (prev_state != NULL) {
3249 } 3249 }
3250 3250
3251 ValueStack* GraphBuilder::copy_state_for_exception_with_bci(int bci) { 3251 ValueStack* GraphBuilder::copy_state_for_exception_with_bci(int bci) {
3252 ValueStack* s = copy_state_exhandling_with_bci(bci); 3252 ValueStack* s = copy_state_exhandling_with_bci(bci);
3253 if (s == NULL) { 3253 if (s == NULL) {
3254 if (_compilation->env()->jvmti_can_access_local_variables()) { 3254 if (_compilation->env()->should_retain_local_variables()) {
3255 s = state()->copy(ValueStack::ExceptionState, bci); 3255 s = state()->copy(ValueStack::ExceptionState, bci);
3256 } else { 3256 } else {
3257 s = state()->copy(ValueStack::EmptyExceptionState, bci); 3257 s = state()->copy(ValueStack::EmptyExceptionState, bci);
3258 } 3258 }
3259 } 3259 }