diff src/share/vm/oops/constMethodOop.hpp @ 1138:dd57230ba8fe

6893268: additional dynamic language related optimizations in C2 Summary: C2 needs some additional optimizations to be able to handle MethodHandle invokes and invokedynamic instructions at the best performance. Reviewed-by: kvn, never
author twisti
date Tue, 05 Jan 2010 15:21:25 +0100
parents 0fbdb4381b99
children c18cbe5936b8
line wrap: on
line diff
--- a/src/share/vm/oops/constMethodOop.hpp	Tue Jan 05 13:05:58 2010 +0100
+++ b/src/share/vm/oops/constMethodOop.hpp	Tue Jan 05 15:21:25 2010 +0100
@@ -258,6 +258,11 @@
   LocalVariableTableElement* localvariable_table_start() const;
 
   // byte codes
+  void    set_code(address code) {
+    if (code_size() > 0) {
+      memcpy(code_base(), code, code_size());
+    }
+  }
   address code_base() const            { return (address) (this+1); }
   address code_end() const             { return code_base() + code_size(); }
   bool    contains(address bcp) const  { return code_base() <= bcp