Mercurial > hg > truffle
comparison src/share/vm/compiler/abstractCompiler.hpp @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | d8041d695d19 |
children | 66a9286203a2 |
comparison
equal
deleted
inserted
replaced
14908:8db6e76cb658 | 14909:4ca6dc0799b6 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1999, 2012, 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. |
76 | 76 |
77 // This method returns true for the first compiler thread that reaches that methods. | 77 // This method returns true for the first compiler thread that reaches that methods. |
78 // This thread will initialize the compiler runtime. | 78 // This thread will initialize the compiler runtime. |
79 bool should_perform_init(); | 79 bool should_perform_init(); |
80 | 80 |
81 // The (closed set) of concrete compiler classes. | 81 // The (closed set) of concrete compiler classes. Using an tag like this |
82 enum Type { | 82 // avoids a confusing use of macros around the definition of the |
83 none, | 83 // 'is_<compiler type>' methods. |
84 c1, | 84 enum Type { c1, c2, shark, graal }; |
85 c2, | |
86 shark, | |
87 graal | |
88 }; | |
89 | 85 |
90 private: | 86 private: |
91 Type _type; | 87 Type _type; |
92 | 88 |
93 #ifdef GRAAL | 89 #ifdef GRAAL |
108 // does *not* answer the question "can this compiler generate code for | 104 // does *not* answer the question "can this compiler generate code for |
109 // a native method". | 105 // a native method". |
110 virtual bool supports_native() { return true; } | 106 virtual bool supports_native() { return true; } |
111 virtual bool supports_osr () { return true; } | 107 virtual bool supports_osr () { return true; } |
112 virtual bool can_compile_method(methodHandle method) { return true; } | 108 virtual bool can_compile_method(methodHandle method) { return true; } |
113 | 109 bool is_c1 () { return _type == c1; } |
114 // Compiler type queries. | 110 bool is_c2 () { return _type == c2; } |
115 bool is_c1() { return _type == c1; } | |
116 bool is_c2() { return _type == c2; } | |
117 bool is_shark() { return _type == shark; } | 111 bool is_shark() { return _type == shark; } |
118 bool is_graal() { return _type == graal; } | 112 bool is_graal() { return _type == graal; } |
119 | 113 |
120 // Customization | 114 // Customization |
121 virtual void initialize () = 0; | 115 virtual void initialize () = 0; |