Mercurial > hg > truffle
diff src/cpu/x86/vm/graalRuntime_x86.cpp @ 7145:6c46172c04bf
consolidated new_type_array and new_object_array stubs into one as there no difference between them
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 07 Dec 2012 18:26:26 +0100 |
parents | 1baf7f1e3f23 |
children | 5d0bb7d52783 2ae3e26b7e9a |
line wrap: on
line diff
--- a/src/cpu/x86/vm/graalRuntime_x86.cpp Fri Dec 07 16:01:38 2012 +0100 +++ b/src/cpu/x86/vm/graalRuntime_x86.cpp Fri Dec 07 18:26:26 2012 +0100 @@ -804,44 +804,18 @@ break; - case graal_new_type_array_id: - case graal_new_object_array_id: + case graal_new_array_id: { Register length = rbx; // Incoming Register klass = rdx; // Incoming Register obj = rax; // Result - if (id == graal_new_type_array_id) { - __ set_info("new_type_array", dont_gc_arguments); - } else { - __ set_info("new_object_array", dont_gc_arguments); - } + __ set_info("new_array", dont_gc_arguments); -#ifdef ASSERT - // assert object type is really an array of the proper kind - { - Label ok; - Register t0 = obj; - __ movl(t0, Address(klass, Klass::layout_helper_offset())); - __ sarl(t0, Klass::_lh_array_tag_shift); - int tag = ((id == graal_new_type_array_id) - ? Klass::_lh_array_tag_type_value - : Klass::_lh_array_tag_obj_value); - __ cmpl(t0, tag); - __ jcc(Assembler::equal, ok); - __ stop("assert(is an array klass)"); - __ should_not_reach_here(); - __ bind(ok); - } -#endif // ASSERT __ enter(); OopMap* map = save_live_registers(sasm, 3); int call_offset; - if (id == graal_new_type_array_id) { - call_offset = __ call_RT(obj, noreg, CAST_FROM_FN_PTR(address, new_type_array), klass, length); - } else { - call_offset = __ call_RT(obj, noreg, CAST_FROM_FN_PTR(address, new_object_array), klass, length); - } + call_offset = __ call_RT(obj, noreg, CAST_FROM_FN_PTR(address, new_array), klass, length); oop_maps = new OopMapSet(); oop_maps->add_gc_map(call_offset, map);