1 /* |
1 /* |
2 * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
82 static int _depth; |
82 static int _depth; |
83 |
83 |
84 static void pop_inner(); // no lock version of pop |
84 static void pop_inner(); // no lock version of pop |
85 public: |
85 public: |
86 static void init(); |
86 static void init(); |
87 static DirectiveSet* getMatchingDirective(methodHandle mh, AbstractCompiler* comp); |
87 static DirectiveSet* getMatchingDirective(const methodHandle& mh, AbstractCompiler* comp); |
88 static DirectiveSet* getDefaultDirective(AbstractCompiler* comp); |
88 static DirectiveSet* getDefaultDirective(AbstractCompiler* comp); |
89 static void push(CompilerDirectives* directive); |
89 static void push(CompilerDirectives* directive); |
90 static void pop(int count); |
90 static void pop(int count); |
91 static bool check_capacity(int request_size, outputStream* st); |
91 static bool check_capacity(int request_size, outputStream* st); |
92 static void clear(); |
92 static void clear(); |
107 bool parse_and_add_inline(char* str, const char*& error_msg); |
107 bool parse_and_add_inline(char* str, const char*& error_msg); |
108 void append_inline(InlineMatcher* m); |
108 void append_inline(InlineMatcher* m); |
109 bool should_inline(ciMethod* inlinee); |
109 bool should_inline(ciMethod* inlinee); |
110 bool should_not_inline(ciMethod* inlinee); |
110 bool should_not_inline(ciMethod* inlinee); |
111 void print_inline(outputStream* st); |
111 void print_inline(outputStream* st); |
112 DirectiveSet* compilecommand_compatibility_init(methodHandle method); |
112 DirectiveSet* compilecommand_compatibility_init(const methodHandle& method); |
113 bool is_exclusive_copy() { return _directive == NULL; } |
113 bool is_exclusive_copy() { return _directive == NULL; } |
114 bool matches_inline(methodHandle method, int inline_action); |
114 bool matches_inline(const methodHandle& method, int inline_action); |
115 static DirectiveSet* clone(DirectiveSet const* src); |
115 static DirectiveSet* clone(DirectiveSet const* src); |
116 bool is_intrinsic_disabled(methodHandle method); |
116 bool is_intrinsic_disabled(const methodHandle& method); |
117 static ccstrlist canonicalize_disableintrinsic(ccstrlist option_value); |
117 static ccstrlist canonicalize_disableintrinsic(ccstrlist option_value); |
118 void finalize(outputStream* st); |
118 void finalize(outputStream* st); |
119 |
119 |
120 typedef enum { |
120 typedef enum { |
121 #define enum_of_flags(name, type, dvalue, cc_flag) name##Index, |
121 #define enum_of_flags(name, type, dvalue, cc_flag) name##Index, |
168 ~CompilerDirectives(); |
168 ~CompilerDirectives(); |
169 |
169 |
170 CompilerDirectives* next(); |
170 CompilerDirectives* next(); |
171 void set_next(CompilerDirectives* next) {_next = next; } |
171 void set_next(CompilerDirectives* next) {_next = next; } |
172 |
172 |
173 bool match(methodHandle method); |
173 bool match(const methodHandle& method); |
174 BasicMatcher* match() { return _match; } |
174 BasicMatcher* match() { return _match; } |
175 bool add_match(char* str, const char*& error_msg); |
175 bool add_match(char* str, const char*& error_msg); |
176 DirectiveSet* get_for(AbstractCompiler *comp); |
176 DirectiveSet* get_for(AbstractCompiler *comp); |
177 void print(outputStream* st); |
177 void print(outputStream* st); |
178 bool is_default_directive() { return _next == NULL; } |
178 bool is_default_directive() { return _next == NULL; } |