Print this page


Split Close
Expand all
Collapse all
          --- old/src/cpu/sparc/vm/sharedRuntime_sparc.cpp
          +++ new/src/cpu/sparc/vm/sharedRuntime_sparc.cpp
   1    1  /*
   2      - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
        2 + * Copyright (c) 2003, 2011, 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
   6    6   * under the terms of the GNU General Public License version 2 only, as
   7    7   * published by the Free Software Foundation.
   8    8   *
   9    9   * This code is distributed in the hope that it will be useful, but WITHOUT
  10   10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11   11   * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12   12   * version 2 for more details (a copy is included in the LICENSE file that
↓ open down ↓ 1749 lines elided ↑ open up ↑
1762 1762  }
1763 1763  
1764 1764  // ---------------------------------------------------------------------------
1765 1765  // Generate a native wrapper for a given method.  The method takes arguments
1766 1766  // in the Java compiled code convention, marshals them to the native
1767 1767  // convention (handlizes oops, etc), transitions to native, makes the call,
1768 1768  // returns to java state (possibly blocking), unhandlizes any result and
1769 1769  // returns.
1770 1770  nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
1771 1771                                                  methodHandle method,
     1772 +                                                int compile_id,
1772 1773                                                  int total_in_args,
1773 1774                                                  int comp_args_on_stack, // in VMRegStackSlots
1774 1775                                                  BasicType *in_sig_bt,
1775 1776                                                  VMRegPair *in_regs,
1776 1777                                                  BasicType ret_type) {
1777 1778  
1778 1779    // Native nmethod wrappers never take possesion of the oop arguments.
1779 1780    // So the caller will gc the arguments. The only thing we need an
1780 1781    // oopMap for is if the call is static
1781 1782    //
↓ open down ↓ 673 lines elided ↑ open up ↑
2455 2456      __ or3 (I1, G1, G1);          // OR 64 bits into G1
2456 2457    }
2457 2458  #endif
2458 2459  
2459 2460    __ ret();
2460 2461    __ delayed()->restore();
2461 2462  
2462 2463    __ flush();
2463 2464  
2464 2465    nmethod *nm = nmethod::new_native_nmethod(method,
     2466 +                                            compile_id,
2465 2467                                              masm->code(),
2466 2468                                              vep_offset,
2467 2469                                              frame_complete,
2468 2470                                              stack_slots / VMRegImpl::slots_per_word,
2469 2471                                              (is_static ? in_ByteSize(klass_offset) : in_ByteSize(receiver_offset)),
2470 2472                                              in_ByteSize(lock_offset),
2471 2473                                              oop_maps);
2472 2474    return nm;
2473 2475  
2474 2476  }
↓ open down ↓ 1235 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX