|
1 | 1 | /* |
2 | | - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * This code is free software; you can redistribute it and/or modify it |
@@ -349,9 +349,6 @@ void JavaCalls::call_helper(JavaValue* result, const methodHandle& method, JavaC |
349 | 349 | assert(!SafepointSynchronize::is_at_safepoint(), "call to Java code during VM operation"); |
350 | 350 | assert(!thread->handle_area()->no_handle_mark_active(), "cannot call out to Java here"); |
351 | 351 |
|
352 | | - |
353 | | - CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops();) |
354 | | - |
355 | 352 | #if INCLUDE_JVMCI |
356 | 353 | // Gets the nmethod (if any) that should be called instead of normal target |
357 | 354 | nmethod* alternative_target = args->alternative_target(); |
@@ -398,10 +395,6 @@ void JavaCalls::call_helper(JavaValue* result, const methodHandle& method, JavaC |
398 | 395 | BasicType result_type = runtime_type_from(result); |
399 | 396 | bool oop_result_flag = (result->get_type() == T_OBJECT || result->get_type() == T_ARRAY); |
400 | 397 |
|
401 | | - // NOTE: if we move the computation of the result_val_address inside |
402 | | - // the call to call_stub, the optimizer produces wrong code. |
403 | | - intptr_t* result_val_address = (intptr_t*)(result->get_value_addr()); |
404 | | - |
405 | 398 | // Find receiver |
406 | 399 | Handle receiver = (!method->is_static()) ? args->receiver() : Handle(); |
407 | 400 |
|
@@ -439,14 +432,19 @@ void JavaCalls::call_helper(JavaValue* result, const methodHandle& method, JavaC |
439 | 432 | { JavaCallWrapper link(method, receiver, result, CHECK); |
440 | 433 | { HandleMark hm(thread); // HandleMark used by HandleMarkCleaner |
441 | 434 |
|
| 435 | + // NOTE: if we move the computation of the result_val_address inside |
| 436 | + // the call to call_stub, the optimizer produces wrong code. |
| 437 | + intptr_t* result_val_address = (intptr_t*)(result->get_value_addr()); |
| 438 | + intptr_t* parameter_address = args->parameters(); |
| 439 | + |
442 | 440 | StubRoutines::call_stub()( |
443 | 441 | (address)&link, |
444 | 442 | // (intptr_t*)&(result->_value), // see NOTE above (compiler problem) |
445 | 443 | result_val_address, // see NOTE above (compiler problem) |
446 | 444 | result_type, |
447 | 445 | method(), |
448 | 446 | entry_point, |
449 | | - args->parameters(), |
| 447 | + parameter_address, |
450 | 448 | args->size_of_parameters(), |
451 | 449 | CHECK |
452 | 450 | ); |
|
0 commit comments