src/share/vm/utilities/globalDefinitions.hpp

changeset 1161
be93aad57795
parent 1145
e5b0439ef4ae
child 1696
0414c1049f15
equal deleted inserted replaced
1160:928912ce8438 1161:be93aad57795
570 // state when it comes to machine representation but is used separately for (oop) 570 // state when it comes to machine representation but is used separately for (oop)
571 // type specific operations (e.g. verification code). 571 // type specific operations (e.g. verification code).
572 572
573 enum TosState { // describes the tos cache contents 573 enum TosState { // describes the tos cache contents
574 btos = 0, // byte, bool tos cached 574 btos = 0, // byte, bool tos cached
575 ctos = 1, // short, char tos cached 575 ctos = 1, // char tos cached
576 stos = 2, // short, char tos cached 576 stos = 2, // short tos cached
577 itos = 3, // int tos cached 577 itos = 3, // int tos cached
578 ltos = 4, // long tos cached 578 ltos = 4, // long tos cached
579 ftos = 5, // float tos cached 579 ftos = 5, // float tos cached
580 dtos = 6, // double tos cached 580 dtos = 6, // double tos cached
581 atos = 7, // object cached 581 atos = 7, // object cached
586 586
587 587
588 inline TosState as_TosState(BasicType type) { 588 inline TosState as_TosState(BasicType type) {
589 switch (type) { 589 switch (type) {
590 case T_BYTE : return btos; 590 case T_BYTE : return btos;
591 case T_BOOLEAN: return btos; 591 case T_BOOLEAN: return btos; // FIXME: Add ztos
592 case T_CHAR : return ctos; 592 case T_CHAR : return ctos;
593 case T_SHORT : return stos; 593 case T_SHORT : return stos;
594 case T_INT : return itos; 594 case T_INT : return itos;
595 case T_LONG : return ltos; 595 case T_LONG : return ltos;
596 case T_FLOAT : return ftos; 596 case T_FLOAT : return ftos;
598 case T_VOID : return vtos; 598 case T_VOID : return vtos;
599 case T_ARRAY : // fall through 599 case T_ARRAY : // fall through
600 case T_OBJECT : return atos; 600 case T_OBJECT : return atos;
601 } 601 }
602 return ilgl; 602 return ilgl;
603 }
604
605 inline BasicType as_BasicType(TosState state) {
606 switch (state) {
607 //case ztos: return T_BOOLEAN;//FIXME
608 case btos : return T_BYTE;
609 case ctos : return T_CHAR;
610 case stos : return T_SHORT;
611 case itos : return T_INT;
612 case ltos : return T_LONG;
613 case ftos : return T_FLOAT;
614 case dtos : return T_DOUBLE;
615 case atos : return T_OBJECT;
616 case vtos : return T_VOID;
617 }
618 return T_ILLEGAL;
603 } 619 }
604 620
605 621
606 // Helper function to convert BasicType info into TosState 622 // Helper function to convert BasicType info into TosState
607 // Note: Cannot define here as it uses global constant at the time being. 623 // Note: Cannot define here as it uses global constant at the time being.

mercurial