1 /* |
1 /* |
2 * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * Copyright 2012, 2014 SAP AG. All rights reserved. |
3 * Copyright (c) 2012, 2017 SAP AG. All rights reserved. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 * |
5 * |
6 * This code is free software; you can redistribute it and/or modify it |
6 * This code is free software; you can redistribute it and/or modify it |
7 * under the terms of the GNU General Public License version 2 only, as |
7 * under the terms of the GNU General Public License version 2 only, as |
8 * published by the Free Software Foundation. |
8 * published by the Free Software Foundation. |
188 #endif |
188 #endif |
189 |
189 |
190 switch (method->result_type()) { |
190 switch (method->result_type()) { |
191 case T_OBJECT: |
191 case T_OBJECT: |
192 case T_ARRAY: { |
192 case T_ARRAY: { |
193 oop* obj_p = *(oop**)lresult; |
193 *oop_result = JNIHandles::resolve(*(jobject*)lresult); |
194 oop obj = (obj_p == NULL) ? (oop)NULL : *obj_p; |
|
195 assert(obj == NULL || Universe::heap()->is_in(obj), "sanity check"); |
|
196 *oop_result = obj; |
|
197 break; |
194 break; |
198 } |
195 } |
199 // We use std/stfd to store the values. |
196 // We use std/stfd to store the values. |
200 case T_BOOLEAN : value_result->z = (jboolean) *(unsigned long*)lresult; break; |
197 case T_BOOLEAN : value_result->z = (jboolean) *(unsigned long*)lresult; break; |
201 case T_INT : value_result->i = (jint) *(long*)lresult; break; |
198 case T_INT : value_result->i = (jint) *(long*)lresult; break; |