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 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 // The classes responsible for code emission and register allocation 26 27 28 class LIRGenerator; 29 class LIREmitter; 30 class Invoke; 31 class SwitchRange; 32 class LIRItem; 33 34 define_array(LIRItemArray, LIRItem*) 35 define_stack(LIRItemList, LIRItemArray) 36 37 class SwitchRange: public CompilationResourceObj { 38 private: 39 int _low_key; 40 int _high_key; 41 BlockBegin* _sux; 42 public: 43 SwitchRange(int start_key, BlockBegin* sux): _low_key(start_key), _high_key(start_key), _sux(sux) {} 44 void set_high_key(int key) { _high_key = key; } 579 580 void dont_load_item() { 581 // do nothing 582 } 583 584 void set_destroys_register() { 585 _destroys_register = true; 586 } 587 588 bool is_constant() const { return value()->as_Constant() != NULL; } 589 bool is_stack() { return result()->is_stack(); } 590 bool is_register() { return result()->is_register(); } 591 592 ciObject* get_jobject_constant() const; 593 jint get_jint_constant() const; 594 jlong get_jlong_constant() const; 595 jfloat get_jfloat_constant() const; 596 jdouble get_jdouble_constant() const; 597 jint get_address_constant() const; 598 }; | 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 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #ifndef SHARE_VM_C1_C1_LIRGENERATOR_HPP 26 #define SHARE_VM_C1_C1_LIRGENERATOR_HPP 27 28 #include "c1/c1_Instruction.hpp" 29 #include "c1/c1_LIR.hpp" 30 #include "ci/ciMethodData.hpp" 31 #include "utilities/sizes.hpp" 32 33 // The classes responsible for code emission and register allocation 34 35 36 class LIRGenerator; 37 class LIREmitter; 38 class Invoke; 39 class SwitchRange; 40 class LIRItem; 41 42 define_array(LIRItemArray, LIRItem*) 43 define_stack(LIRItemList, LIRItemArray) 44 45 class SwitchRange: public CompilationResourceObj { 46 private: 47 int _low_key; 48 int _high_key; 49 BlockBegin* _sux; 50 public: 51 SwitchRange(int start_key, BlockBegin* sux): _low_key(start_key), _high_key(start_key), _sux(sux) {} 52 void set_high_key(int key) { _high_key = key; } 587 588 void dont_load_item() { 589 // do nothing 590 } 591 592 void set_destroys_register() { 593 _destroys_register = true; 594 } 595 596 bool is_constant() const { return value()->as_Constant() != NULL; } 597 bool is_stack() { return result()->is_stack(); } 598 bool is_register() { return result()->is_register(); } 599 600 ciObject* get_jobject_constant() const; 601 jint get_jint_constant() const; 602 jlong get_jlong_constant() const; 603 jfloat get_jfloat_constant() const; 604 jdouble get_jdouble_constant() const; 605 jint get_address_constant() const; 606 }; 607 608 #endif // SHARE_VM_C1_C1_LIRGENERATOR_HPP |