|
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 |
@@ -346,9 +346,6 @@ void JavaCalls::call_helper(JavaValue* result, const methodHandle& method, JavaC |
346 | 346 | assert(!SafepointSynchronize::is_at_safepoint(), "call to Java code during VM operation"); |
347 | 347 | assert(!thread->handle_area()->no_handle_mark_active(), "cannot call out to Java here"); |
348 | 348 |
|
349 | | - |
350 | | - CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops();) |
351 | | - |
352 | 349 | #if INCLUDE_JVMCI |
353 | 350 | // Gets the nmethod (if any) that should be called instead of normal target |
354 | 351 | nmethod* alternative_target = args->alternative_target(); |
@@ -395,10 +392,6 @@ void JavaCalls::call_helper(JavaValue* result, const methodHandle& method, JavaC |
395 | 392 | BasicType result_type = runtime_type_from(result); |
396 | 393 | bool oop_result_flag = (result->get_type() == T_OBJECT || result->get_type() == T_ARRAY); |
397 | 394 |
|
398 | | - // NOTE: if we move the computation of the result_val_address inside |
399 | | - // the call to call_stub, the optimizer produces wrong code. |
400 | | - intptr_t* result_val_address = (intptr_t*)(result->get_value_addr()); |
401 | | - |
402 | 395 | // Find receiver |
403 | 396 | Handle receiver = (!method->is_static()) ? args->receiver() : Handle(); |
404 | 397 |
|
@@ -436,14 +429,19 @@ void JavaCalls::call_helper(JavaValue* result, const methodHandle& method, JavaC |
436 | 429 | { JavaCallWrapper link(method, receiver, result, CHECK); |
437 | 430 | { HandleMark hm(thread); // HandleMark used by HandleMarkCleaner |
438 | 431 |
|
| 432 | + // NOTE: if we move the computation of the result_val_address inside |
| 433 | + // the call to call_stub, the optimizer produces wrong code. |
| 434 | + intptr_t* result_val_address = (intptr_t*)(result->get_value_addr()); |
| 435 | + intptr_t* parameter_address = args->parameters(); |
| 436 | + |
439 | 437 | StubRoutines::call_stub()( |
440 | 438 | (address)&link, |
441 | 439 | // (intptr_t*)&(result->_value), // see NOTE above (compiler problem) |
442 | 440 | result_val_address, // see NOTE above (compiler problem) |
443 | 441 | result_type, |
444 | 442 | method(), |
445 | 443 | entry_point, |
446 | | - args->parameters(), |
| 444 | + parameter_address, |
447 | 445 | args->size_of_parameters(), |
448 | 446 | CHECK |
449 | 447 | ); |
|
0 commit comments