1 /* |
1 /* |
2 * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
1410 patching_info = state_for(x, x->state_before()); |
1410 patching_info = state_for(x, x->state_before()); |
1411 } |
1411 } |
1412 |
1412 |
1413 obj.load_item(); |
1413 obj.load_item(); |
1414 |
1414 |
1415 CodeEmitInfo* info_for_exception = state_for(x); |
1415 CodeEmitInfo* info_for_exception = |
|
1416 (x->needs_exception_state() ? state_for(x) : |
|
1417 state_for(x, x->state_before(), true /*ignore_xhandler*/)); |
|
1418 |
1416 CodeStub* stub; |
1419 CodeStub* stub; |
1417 if (x->is_incompatible_class_change_check()) { |
1420 if (x->is_incompatible_class_change_check()) { |
1418 assert(patching_info == NULL, "can't patch this"); |
1421 assert(patching_info == NULL, "can't patch this"); |
1419 stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, |
1422 stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, |
1420 LIR_OprFact::illegalOpr, info_for_exception); |
1423 LIR_OprFact::illegalOpr, info_for_exception); |
|
1424 } else if (x->is_invokespecial_receiver_check()) { |
|
1425 assert(patching_info == NULL, "can't patch this"); |
|
1426 stub = new DeoptimizeStub(info_for_exception, |
|
1427 Deoptimization::Reason_class_check, |
|
1428 Deoptimization::Action_none); |
1421 } else { |
1429 } else { |
1422 stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, |
1430 stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, |
1423 LIR_OprFact::illegalOpr, info_for_exception); |
1431 LIR_OprFact::illegalOpr, info_for_exception); |
1424 } |
1432 } |
1425 |
1433 |