hotspot/src/share/vm/opto/library_call.cpp
changeset 36551 77f29c57ed2e
parent 36337 d4b2f60ff5a9
child 36553 203b2b5d149b
equal deleted inserted replaced
36550:6d26e3a083cb 36551:77f29c57ed2e
    46 #include "opto/opaquenode.hpp"
    46 #include "opto/opaquenode.hpp"
    47 #include "opto/parse.hpp"
    47 #include "opto/parse.hpp"
    48 #include "opto/runtime.hpp"
    48 #include "opto/runtime.hpp"
    49 #include "opto/subnode.hpp"
    49 #include "opto/subnode.hpp"
    50 #include "prims/nativeLookup.hpp"
    50 #include "prims/nativeLookup.hpp"
       
    51 #include "prims/unsafe.hpp"
    51 #include "runtime/sharedRuntime.hpp"
    52 #include "runtime/sharedRuntime.hpp"
    52 #include "trace/traceMacros.hpp"
    53 #include "trace/traceMacros.hpp"
    53 
    54 
    54 class LibraryIntrinsic : public InlineCallGenerator {
    55 class LibraryIntrinsic : public InlineCallGenerator {
    55   // Extend the set of intrinsics known to the runtime:
    56   // Extend the set of intrinsics known to the runtime:
  2303   // Final sync IdealKit and GraphKit.
  2304   // Final sync IdealKit and GraphKit.
  2304   final_sync(ideal);
  2305   final_sync(ideal);
  2305 #undef __
  2306 #undef __
  2306 }
  2307 }
  2307 
  2308 
  2308 
       
  2309 // Interpret Unsafe.fieldOffset cookies correctly:
       
  2310 extern jlong Unsafe_field_offset_to_byte_offset(jlong field_offset);
       
  2311 
  2309 
  2312 const TypeOopPtr* LibraryCallKit::sharpen_unsafe_type(Compile::AliasType* alias_type, const TypePtr *adr_type, bool is_native_ptr) {
  2310 const TypeOopPtr* LibraryCallKit::sharpen_unsafe_type(Compile::AliasType* alias_type, const TypePtr *adr_type, bool is_native_ptr) {
  2313   // Attempt to infer a sharper value type from the offset and base type.
  2311   // Attempt to infer a sharper value type from the offset and base type.
  2314   ciKlass* sharpened_klass = NULL;
  2312   ciKlass* sharpened_klass = NULL;
  2315 
  2313 
  4464   set_result(_gvn.transform(result));
  4462   set_result(_gvn.transform(result));
  4465   return true;
  4463   return true;
  4466 }
  4464 }
  4467 
  4465 
  4468 //----------------------inline_unsafe_copyMemory-------------------------
  4466 //----------------------inline_unsafe_copyMemory-------------------------
  4469 // public native void Unsafe.copyMemory(Object srcBase, long srcOffset, Object destBase, long destOffset, long bytes);
  4467 // public native void Unsafe.copyMemory0(Object srcBase, long srcOffset, Object destBase, long destOffset, long bytes);
  4470 bool LibraryCallKit::inline_unsafe_copyMemory() {
  4468 bool LibraryCallKit::inline_unsafe_copyMemory() {
  4471   if (callee()->is_static())  return false;  // caller must have the capability!
  4469   if (callee()->is_static())  return false;  // caller must have the capability!
  4472   null_check_receiver();  // null-check receiver
  4470   null_check_receiver();  // null-check receiver
  4473   if (stopped())  return true;
  4471   if (stopped())  return true;
  4474 
  4472