< prev index next >

src/share/vm/compiler/compilerDirectives.hpp

Print this page




  84 
  85   static void pop_inner(); // no lock version of pop
  86 public:
  87   static void init();
  88   static DirectiveSet* getMatchingDirective(methodHandle mh, AbstractCompiler* comp);
  89   static DirectiveSet* getDefaultDirective(AbstractCompiler* comp);
  90   static void push(CompilerDirectives* directive);
  91   static void pop(int count);
  92   static bool check_capacity(int request_size, outputStream* st);
  93   static void clear();
  94   static void print(outputStream* st);
  95   static void release(DirectiveSet* set);
  96   static void release(CompilerDirectives* dir);
  97 };
  98 
  99 class DirectiveSet : public CHeapObj<mtCompiler> {
 100 private:
 101   InlineMatcher* _inlinematchers;
 102   CompilerDirectives* _directive;
 103 
 104   static ccstrlist canonicalize_disableintrinsic(ccstrlist option_value);
 105 
 106 public:
 107   DirectiveSet(CompilerDirectives* directive);
 108   ~DirectiveSet();
 109   CompilerDirectives* directive();
 110   bool parse_and_add_inline(char* str, const char*& error_msg);
 111   void append_inline(InlineMatcher* m);
 112   bool should_inline(ciMethod* inlinee);
 113   bool should_not_inline(ciMethod* inlinee);
 114   void print_inline(outputStream* st);
 115   DirectiveSet* compilecommand_compatibility_init(methodHandle method);
 116   bool is_exclusive_copy() { return _directive == NULL; }
 117   bool matches_inline(methodHandle method, int inline_action);
 118   static DirectiveSet* clone(DirectiveSet const* src);
 119   bool is_intrinsic_disabled(methodHandle method);

 120   void finalize(outputStream* st);
 121 
 122   typedef enum {
 123 #define enum_of_flags(name, type, dvalue, cc_flag) name##Index,
 124     compilerdirectives_common_flags(enum_of_flags)
 125     compilerdirectives_c2_flags(enum_of_flags)
 126     compilerdirectives_c1_flags(enum_of_flags)
 127     number_of_flags
 128   } flags;
 129 
 130   bool _modified[number_of_flags];
 131 
 132 #define flag_store_definition(name, type, dvalue, cc_flag) type name##Option;
 133   compilerdirectives_common_flags(flag_store_definition)
 134   compilerdirectives_c2_flags(flag_store_definition)
 135   compilerdirectives_c1_flags(flag_store_definition)
 136 
 137 // Casting to get the same function signature for all setters. Used from parser.
 138 #define set_function_definition(name, type, dvalue, cc_flag) void set_##name(void* value) { type val = *(type*)value; name##Option = val; _modified[name##Index] = 1; }
 139   compilerdirectives_common_flags(set_function_definition)




  84 
  85   static void pop_inner(); // no lock version of pop
  86 public:
  87   static void init();
  88   static DirectiveSet* getMatchingDirective(methodHandle mh, AbstractCompiler* comp);
  89   static DirectiveSet* getDefaultDirective(AbstractCompiler* comp);
  90   static void push(CompilerDirectives* directive);
  91   static void pop(int count);
  92   static bool check_capacity(int request_size, outputStream* st);
  93   static void clear();
  94   static void print(outputStream* st);
  95   static void release(DirectiveSet* set);
  96   static void release(CompilerDirectives* dir);
  97 };
  98 
  99 class DirectiveSet : public CHeapObj<mtCompiler> {
 100 private:
 101   InlineMatcher* _inlinematchers;
 102   CompilerDirectives* _directive;
 103 


 104 public:
 105   DirectiveSet(CompilerDirectives* directive);
 106   ~DirectiveSet();
 107   CompilerDirectives* directive();
 108   bool parse_and_add_inline(char* str, const char*& error_msg);
 109   void append_inline(InlineMatcher* m);
 110   bool should_inline(ciMethod* inlinee);
 111   bool should_not_inline(ciMethod* inlinee);
 112   void print_inline(outputStream* st);
 113   DirectiveSet* compilecommand_compatibility_init(methodHandle method);
 114   bool is_exclusive_copy() { return _directive == NULL; }
 115   bool matches_inline(methodHandle method, int inline_action);
 116   static DirectiveSet* clone(DirectiveSet const* src);
 117   bool is_intrinsic_disabled(methodHandle method);
 118   static ccstrlist canonicalize_disableintrinsic(ccstrlist option_value);
 119   void finalize(outputStream* st);
 120 
 121   typedef enum {
 122 #define enum_of_flags(name, type, dvalue, cc_flag) name##Index,
 123     compilerdirectives_common_flags(enum_of_flags)
 124     compilerdirectives_c2_flags(enum_of_flags)
 125     compilerdirectives_c1_flags(enum_of_flags)
 126     number_of_flags
 127   } flags;
 128 
 129   bool _modified[number_of_flags];
 130 
 131 #define flag_store_definition(name, type, dvalue, cc_flag) type name##Option;
 132   compilerdirectives_common_flags(flag_store_definition)
 133   compilerdirectives_c2_flags(flag_store_definition)
 134   compilerdirectives_c1_flags(flag_store_definition)
 135 
 136 // Casting to get the same function signature for all setters. Used from parser.
 137 #define set_function_definition(name, type, dvalue, cc_flag) void set_##name(void* value) { type val = *(type*)value; name##Option = val; _modified[name##Index] = 1; }
 138   compilerdirectives_common_flags(set_function_definition)


< prev index next >