src/share/vm/shark/sharkCompiler.hpp

Print this page




  33 #include "shark/llvmHeaders.hpp"
  34 #include "shark/sharkMemoryManager.hpp"
  35 
  36 class SharkContext;
  37 
  38 class SharkCompiler : public AbstractCompiler {
  39  public:
  40   // Creation
  41   SharkCompiler();
  42 
  43   // Name of this compiler
  44   const char *name()     { return "shark"; }
  45 
  46   // Missing feature tests
  47   bool supports_native() { return true; }
  48   bool supports_osr()    { return true; }
  49   bool can_compile_method(methodHandle method)  {
  50     return ! (method->is_method_handle_intrinsic() || method->is_compiled_lambda_form());
  51   }
  52 
  53   // Customization
  54   bool needs_adapters()  { return false; }
  55   bool needs_stubs()     { return false; }
  56 
  57   // Initialization
  58   void initialize();
  59 
  60   // Compile a normal (bytecode) method and install it in the VM
  61   void compile_method(ciEnv* env, ciMethod* target, int entry_bci);
  62 
  63   // Generate a wrapper for a native (JNI) method
  64   nmethod* generate_native_wrapper(MacroAssembler* masm,
  65                                    methodHandle    target,
  66                                    int             compile_id,
  67                                    BasicType*      arg_types,
  68                                    BasicType       return_type);
  69 
  70   // Free compiled methods (and native wrappers)
  71   void free_compiled_method(address code);
  72 
  73   // Each thread generating IR needs its own context.  The normal
  74   // context is used for bytecode methods, and is protected from
  75   // multiple simultaneous accesses by being restricted to the
  76   // compiler thread.  The native context is used for JNI methods,




  33 #include "shark/llvmHeaders.hpp"
  34 #include "shark/sharkMemoryManager.hpp"
  35 
  36 class SharkContext;
  37 
  38 class SharkCompiler : public AbstractCompiler {
  39  public:
  40   // Creation
  41   SharkCompiler();
  42 
  43   // Name of this compiler
  44   const char *name()     { return "shark"; }
  45 
  46   // Missing feature tests
  47   bool supports_native() { return true; }
  48   bool supports_osr()    { return true; }
  49   bool can_compile_method(methodHandle method)  {
  50     return ! (method->is_method_handle_intrinsic() || method->is_compiled_lambda_form());
  51   }
  52 




  53   // Initialization
  54   void initialize();
  55 
  56   // Compile a normal (bytecode) method and install it in the VM
  57   void compile_method(ciEnv* env, ciMethod* target, int entry_bci);
  58 
  59   // Generate a wrapper for a native (JNI) method
  60   nmethod* generate_native_wrapper(MacroAssembler* masm,
  61                                    methodHandle    target,
  62                                    int             compile_id,
  63                                    BasicType*      arg_types,
  64                                    BasicType       return_type);
  65 
  66   // Free compiled methods (and native wrappers)
  67   void free_compiled_method(address code);
  68 
  69   // Each thread generating IR needs its own context.  The normal
  70   // context is used for bytecode methods, and is protected from
  71   // multiple simultaneous accesses by being restricted to the
  72   // compiler thread.  The native context is used for JNI methods,