58
59 // Only used during deopt- preserve object type.
60 StackValue(intptr_t o, BasicType t) {
61 assert(t == T_OBJECT, "should not be used");
62 _type = t;
63 _integer_value = o;
64 }
65
66 Handle get_obj() const {
67 assert(type() == T_OBJECT, "type check");
68 return _handle_value;
69 }
70
71 bool obj_is_scalar_replaced() const {
72 assert(type() == T_OBJECT, "type check");
73 return _integer_value != 0;
74 }
75
76 void set_obj(Handle value) {
77 assert(type() == T_OBJECT, "type check");
78 _handle_value = value;
79 }
80
81 intptr_t get_int() const {
82 assert(type() == T_INT, "type check");
83 return _integer_value;
84 }
85
86 // For special case in deopt.
87 intptr_t get_int(BasicType t) const {
88 assert(t == T_OBJECT && type() == T_OBJECT, "type check");
89 return _integer_value;
90 }
91
92 void set_int(intptr_t value) {
93 assert(type() == T_INT, "type check");
94 _integer_value = value;
95 }
96
97 BasicType type() const { return _type; }
|
58
59 // Only used during deopt- preserve object type.
60 StackValue(intptr_t o, BasicType t) {
61 assert(t == T_OBJECT, "should not be used");
62 _type = t;
63 _integer_value = o;
64 }
65
66 Handle get_obj() const {
67 assert(type() == T_OBJECT, "type check");
68 return _handle_value;
69 }
70
71 bool obj_is_scalar_replaced() const {
72 assert(type() == T_OBJECT, "type check");
73 return _integer_value != 0;
74 }
75
76 void set_obj(Handle value) {
77 assert(type() == T_OBJECT, "type check");
78 _integer_value = 0;
79 _handle_value = value;
80 }
81
82 intptr_t get_int() const {
83 assert(type() == T_INT, "type check");
84 return _integer_value;
85 }
86
87 // For special case in deopt.
88 intptr_t get_int(BasicType t) const {
89 assert(t == T_OBJECT && type() == T_OBJECT, "type check");
90 return _integer_value;
91 }
92
93 void set_int(intptr_t value) {
94 assert(type() == T_INT, "type check");
95 _integer_value = value;
96 }
97
98 BasicType type() const { return _type; }
|