Lines Matching refs:constant
425 // Check that null value is not represented as an integer constant.
459 static int32_t GetInt32ValueOf(HConstant* constant) {
460 if (constant->IsIntConstant()) {
461 return constant->AsIntConstant()->GetValue();
462 } else if (constant->IsNullConstant()) {
465 DCHECK(constant->IsFloatConstant());
466 return bit_cast<int32_t, float>(constant->AsFloatConstant()->GetValue());
470 static int64_t GetInt64ValueOf(HConstant* constant) {
471 if (constant->IsIntConstant()) {
472 return constant->AsIntConstant()->GetValue();
473 } else if (constant->IsNullConstant()) {
475 } else if (constant->IsFloatConstant()) {
476 return bit_cast<int32_t, float>(constant->AsFloatConstant()->GetValue());
477 } else if (constant->IsLongConstant()) {
478 return constant->AsLongConstant()->GetValue();
480 DCHECK(constant->IsDoubleConstant());
481 return bit_cast<int64_t, double>(constant->AsDoubleConstant()->GetValue());