Print this page


Split Close
Expand all
Collapse all
          --- old/src/cpu/x86/vm/sharedRuntime_x86_64.cpp
          +++ new/src/cpu/x86/vm/sharedRuntime_x86_64.cpp
↓ open down ↓ 1166 lines elided ↑ open up ↑
1167 1167  }
1168 1168  
1169 1169  // ---------------------------------------------------------------------------
1170 1170  // Generate a native wrapper for a given method.  The method takes arguments
1171 1171  // in the Java compiled code convention, marshals them to the native
1172 1172  // convention (handlizes oops, etc), transitions to native, makes the call,
1173 1173  // returns to java state (possibly blocking), unhandlizes any result and
1174 1174  // returns.
1175 1175  nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
1176 1176                                                  methodHandle method,
     1177 +                                                int compile_id,
1177 1178                                                  int total_in_args,
1178 1179                                                  int comp_args_on_stack,
1179 1180                                                  BasicType *in_sig_bt,
1180 1181                                                  VMRegPair *in_regs,
1181 1182                                                  BasicType ret_type) {
1182 1183    // Native nmethod wrappers never take possesion of the oop arguments.
1183 1184    // So the caller will gc the arguments. The only thing we need an
1184 1185    // oopMap for is if the call is static
1185 1186    //
1186 1187    // An OopMap for lock (and class if static)
↓ open down ↓ 687 lines elided ↑ open up ↑
1874 1875    __ reinit_heapbase();
1875 1876    restore_native_result(masm, ret_type, stack_slots);
1876 1877    // and continue
1877 1878    __ jmp(reguard_done);
1878 1879  
1879 1880  
1880 1881  
1881 1882    __ flush();
1882 1883  
1883 1884    nmethod *nm = nmethod::new_native_nmethod(method,
     1885 +                                            compile_id,
1884 1886                                              masm->code(),
1885 1887                                              vep_offset,
1886 1888                                              frame_complete,
1887 1889                                              stack_slots / VMRegImpl::slots_per_word,
1888 1890                                              (is_static ? in_ByteSize(klass_offset) : in_ByteSize(receiver_offset)),
1889 1891                                              in_ByteSize(lock_slot_offset*VMRegImpl::stack_slot_size),
1890 1892                                              oop_maps);
1891 1893    return nm;
1892 1894  
1893 1895  }
↓ open down ↓ 1453 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX