Mercurial > hg > truffle
comparison src/share/vm/c1/c1_LIR.cpp @ 1330:4a9cc99938e3
Merge
author | acorn |
---|---|
date | Fri, 26 Mar 2010 11:10:26 -0400 |
parents | fc2c71045ada |
children | 9f5b60a14736 |
comparison
equal
deleted
inserted
replaced
1329:84043c7507b9 | 1330:4a9cc99938e3 |
---|---|
1 /* | 1 /* |
2 * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright 2000-2010 Sun Microsystems, Inc. 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. |
74 return LIR_OprFact::oopConst(NULL); | 74 return LIR_OprFact::oopConst(NULL); |
75 } else { | 75 } else { |
76 return LIR_OprFact::oopConst(type->as_ObjectType()->encoding()); | 76 return LIR_OprFact::oopConst(type->as_ObjectType()->encoding()); |
77 } | 77 } |
78 } | 78 } |
79 case addressTag: return LIR_OprFact::intConst(type->as_AddressConstant()->value()); | 79 case addressTag: return LIR_OprFact::addressConst(type->as_AddressConstant()->value()); |
80 case intTag : return LIR_OprFact::intConst(type->as_IntConstant()->value()); | 80 case intTag : return LIR_OprFact::intConst(type->as_IntConstant()->value()); |
81 case floatTag : return LIR_OprFact::floatConst(type->as_FloatConstant()->value()); | 81 case floatTag : return LIR_OprFact::floatConst(type->as_FloatConstant()->value()); |
82 case longTag : return LIR_OprFact::longConst(type->as_LongConstant()->value()); | 82 case longTag : return LIR_OprFact::longConst(type->as_LongConstant()->value()); |
83 case doubleTag : return LIR_OprFact::doubleConst(type->as_DoubleConstant()->value()); | 83 case doubleTag : return LIR_OprFact::doubleConst(type->as_DoubleConstant()->value()); |
84 default: ShouldNotReachHere(); return LIR_OprFact::intConst(-1); | 84 default: ShouldNotReachHere(); return LIR_OprFact::intConst(-1); |
87 | 87 |
88 | 88 |
89 LIR_Opr LIR_OprFact::dummy_value_type(ValueType* type) { | 89 LIR_Opr LIR_OprFact::dummy_value_type(ValueType* type) { |
90 switch (type->tag()) { | 90 switch (type->tag()) { |
91 case objectTag: return LIR_OprFact::oopConst(NULL); | 91 case objectTag: return LIR_OprFact::oopConst(NULL); |
92 case addressTag: | 92 case addressTag:return LIR_OprFact::addressConst(0); |
93 case intTag: return LIR_OprFact::intConst(0); | 93 case intTag: return LIR_OprFact::intConst(0); |
94 case floatTag: return LIR_OprFact::floatConst(0.0); | 94 case floatTag: return LIR_OprFact::floatConst(0.0); |
95 case longTag: return LIR_OprFact::longConst(0); | 95 case longTag: return LIR_OprFact::longConst(0); |
96 case doubleTag: return LIR_OprFact::doubleConst(0.0); | 96 case doubleTag: return LIR_OprFact::doubleConst(0.0); |
97 default: ShouldNotReachHere(); return LIR_OprFact::intConst(-1); | 97 default: ShouldNotReachHere(); return LIR_OprFact::intConst(-1); |
687 | 687 |
688 // LIR_OpJavaCall | 688 // LIR_OpJavaCall |
689 case lir_static_call: | 689 case lir_static_call: |
690 case lir_optvirtual_call: | 690 case lir_optvirtual_call: |
691 case lir_icvirtual_call: | 691 case lir_icvirtual_call: |
692 case lir_virtual_call: { | 692 case lir_virtual_call: |
693 assert(op->as_OpJavaCall() != NULL, "must be"); | 693 case lir_dynamic_call: { |
694 LIR_OpJavaCall* opJavaCall = (LIR_OpJavaCall*)op; | 694 LIR_OpJavaCall* opJavaCall = op->as_OpJavaCall(); |
695 assert(opJavaCall != NULL, "must be"); | |
695 | 696 |
696 if (opJavaCall->_receiver->is_valid()) do_input(opJavaCall->_receiver); | 697 if (opJavaCall->_receiver->is_valid()) do_input(opJavaCall->_receiver); |
697 | 698 |
698 // only visit register parameters | 699 // only visit register parameters |
699 int n = opJavaCall->_arguments->length(); | 700 int n = opJavaCall->_arguments->length(); |
702 do_input(*opJavaCall->_arguments->adr_at(i)); | 703 do_input(*opJavaCall->_arguments->adr_at(i)); |
703 } | 704 } |
704 } | 705 } |
705 | 706 |
706 if (opJavaCall->_info) do_info(opJavaCall->_info); | 707 if (opJavaCall->_info) do_info(opJavaCall->_info); |
708 if (opJavaCall->is_method_handle_invoke()) do_temp(FrameMap::method_handle_invoke_SP_save_opr()); | |
707 do_call(); | 709 do_call(); |
708 if (opJavaCall->_result->is_valid()) do_output(opJavaCall->_result); | 710 if (opJavaCall->_result->is_valid()) do_output(opJavaCall->_result); |
709 | 711 |
710 break; | 712 break; |
711 } | 713 } |
1408 | 1410 |
1409 | 1411 |
1410 // LIR_Address | 1412 // LIR_Address |
1411 void LIR_Const::print_value_on(outputStream* out) const { | 1413 void LIR_Const::print_value_on(outputStream* out) const { |
1412 switch (type()) { | 1414 switch (type()) { |
1415 case T_ADDRESS:out->print("address:%d",as_jint()); break; | |
1413 case T_INT: out->print("int:%d", as_jint()); break; | 1416 case T_INT: out->print("int:%d", as_jint()); break; |
1414 case T_LONG: out->print("lng:%lld", as_jlong()); break; | 1417 case T_LONG: out->print("lng:%lld", as_jlong()); break; |
1415 case T_FLOAT: out->print("flt:%f", as_jfloat()); break; | 1418 case T_FLOAT: out->print("flt:%f", as_jfloat()); break; |
1416 case T_DOUBLE: out->print("dbl:%f", as_jdouble()); break; | 1419 case T_DOUBLE: out->print("dbl:%f", as_jdouble()); break; |
1417 case T_OBJECT: out->print("obj:0x%x", as_jobject()); break; | 1420 case T_OBJECT: out->print("obj:0x%x", as_jobject()); break; |
1588 // LIR_OpJavaCall | 1591 // LIR_OpJavaCall |
1589 case lir_static_call: s = "static"; break; | 1592 case lir_static_call: s = "static"; break; |
1590 case lir_optvirtual_call: s = "optvirtual"; break; | 1593 case lir_optvirtual_call: s = "optvirtual"; break; |
1591 case lir_icvirtual_call: s = "icvirtual"; break; | 1594 case lir_icvirtual_call: s = "icvirtual"; break; |
1592 case lir_virtual_call: s = "virtual"; break; | 1595 case lir_virtual_call: s = "virtual"; break; |
1596 case lir_dynamic_call: s = "dynamic"; break; | |
1593 // LIR_OpArrayCopy | 1597 // LIR_OpArrayCopy |
1594 case lir_arraycopy: s = "arraycopy"; break; | 1598 case lir_arraycopy: s = "arraycopy"; break; |
1595 // LIR_OpLock | 1599 // LIR_OpLock |
1596 case lir_lock: s = "lock"; break; | 1600 case lir_lock: s = "lock"; break; |
1597 case lir_unlock: s = "unlock"; break; | 1601 case lir_unlock: s = "unlock"; break; |