summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/optimizing/intrinsics.cc4
-rw-r--r--compiler/optimizing/intrinsics.h2
-rw-r--r--compiler/optimizing/intrinsics_arm64.cc24
-rw-r--r--compiler/optimizing/intrinsics_arm64.h2
-rw-r--r--compiler/optimizing/intrinsics_arm_vixl.cc24
-rw-r--r--compiler/optimizing/intrinsics_arm_vixl.h2
-rw-r--r--compiler/optimizing/intrinsics_x86.cc22
-rw-r--r--compiler/optimizing/intrinsics_x86.h2
-rw-r--r--compiler/optimizing/intrinsics_x86_64.cc26
-rw-r--r--compiler/optimizing/intrinsics_x86_64.h2
10 files changed, 55 insertions, 55 deletions
diff --git a/compiler/optimizing/intrinsics.cc b/compiler/optimizing/intrinsics.cc
index d960d5f212..8330a973ff 100644
--- a/compiler/optimizing/intrinsics.cc
+++ b/compiler/optimizing/intrinsics.cc
@@ -93,7 +93,7 @@ void IntrinsicVisitor::ComputeValueOfLocations(HInvoke* invoke,
return;
}
HInstruction* const input = invoke->InputAt(0);
- if (input->IsConstant()) {
+ if (input->IsIntConstant()) {
int32_t value = input->AsIntConstant()->GetValue();
if (static_cast<uint32_t>(value) - static_cast<uint32_t>(low) < static_cast<uint32_t>(length)) {
// No call, we shall use direct pointer to the boxed object.
@@ -131,7 +131,7 @@ IntrinsicVisitor::ValueOfInfo IntrinsicVisitor::ComputeValueOfInfo(
info.length = length;
info.value_offset = value_field->GetOffset().Uint32Value();
if (compiler_options.IsBootImage()) {
- if (invoke->InputAt(0)->IsConstant()) {
+ if (invoke->InputAt(0)->IsIntConstant()) {
int32_t input_value = invoke->InputAt(0)->AsIntConstant()->GetValue();
uint32_t index = static_cast<uint32_t>(input_value) - static_cast<uint32_t>(info.low);
if (index < static_cast<uint32_t>(info.length)) {
diff --git a/compiler/optimizing/intrinsics.h b/compiler/optimizing/intrinsics.h
index d901f7e10c..6645e5da1a 100644
--- a/compiler/optimizing/intrinsics.h
+++ b/compiler/optimizing/intrinsics.h
@@ -108,7 +108,7 @@ class IntrinsicVisitor : public ValueObject {
ValueOfInfo();
- // Offset of the Integer.value field for initializing a newly allocated instance.
+ // Offset of the value field of the boxed object for initializing a newly allocated instance.
uint32_t value_offset;
// The low value in the cache.
int32_t low;
diff --git a/compiler/optimizing/intrinsics_arm64.cc b/compiler/optimizing/intrinsics_arm64.cc
index 4087afa1c2..92e7c13c6d 100644
--- a/compiler/optimizing/intrinsics_arm64.cc
+++ b/compiler/optimizing/intrinsics_arm64.cc
@@ -3484,13 +3484,13 @@ void IntrinsicCodeGeneratorARM64::VisitDoubleIsInfinite(HInvoke* invoke) {
} \
void IntrinsicCodeGeneratorARM64::Visit ##name ##ValueOf(HInvoke* invoke) { \
IntrinsicVisitor::ValueOfInfo info = \
- IntrinsicVisitor::ComputeValueOfInfo( \
- invoke, \
- codegen_->GetCompilerOptions(), \
- WellKnownClasses::java_lang_ ##name ##_value, \
- low, \
- high - low + 1, \
- start_index); \
+ IntrinsicVisitor::ComputeValueOfInfo( \
+ invoke, \
+ codegen_->GetCompilerOptions(), \
+ WellKnownClasses::java_lang_ ##name ##_value, \
+ low, \
+ high - low + 1, \
+ start_index); \
HandleValueOf(invoke, info, type); \
}
BOXED_TYPES(VISIT_INTRINSIC)
@@ -3498,7 +3498,7 @@ void IntrinsicCodeGeneratorARM64::VisitDoubleIsInfinite(HInvoke* invoke) {
void IntrinsicCodeGeneratorARM64::HandleValueOf(HInvoke* invoke,
const IntrinsicVisitor::ValueOfInfo& info,
- DataType::Type primitive_type) {
+ DataType::Type type) {
LocationSummary* locations = invoke->GetLocations();
MacroAssembler* masm = GetVIXLAssembler();
@@ -3511,10 +3511,10 @@ void IntrinsicCodeGeneratorARM64::HandleValueOf(HInvoke* invoke,
codegen_->InvokeRuntime(kQuickAllocObjectInitialized, invoke, invoke->GetDexPc());
CheckEntrypointTypes<kQuickAllocObjectWithChecks, void*, mirror::Class*>();
};
- if (invoke->InputAt(0)->IsConstant()) {
+ if (invoke->InputAt(0)->IsIntConstant()) {
int32_t value = invoke->InputAt(0)->AsIntConstant()->GetValue();
if (static_cast<uint32_t>(value - info.low) < info.length) {
- // Just embed the j.l.Integer in the code.
+ // Just embed the object in the code.
DCHECK_NE(info.value_boot_image_reference, ValueOfInfo::kInvalidReference);
codegen_->LoadBootImageAddress(out, info.value_boot_image_reference);
} else {
@@ -3524,7 +3524,7 @@ void IntrinsicCodeGeneratorARM64::HandleValueOf(HInvoke* invoke,
// JIT object table.
allocate_instance();
__ Mov(temp.W(), value);
- codegen_->Store(primitive_type, temp.W(), HeapOperand(out.W(), info.value_offset));
+ codegen_->Store(type, temp.W(), HeapOperand(out.W(), info.value_offset));
// Class pointer and `value` final field stores require a barrier before publication.
codegen_->GenerateMemoryBarrier(MemBarrierKind::kStoreStore);
}
@@ -3546,7 +3546,7 @@ void IntrinsicCodeGeneratorARM64::HandleValueOf(HInvoke* invoke,
__ Bind(&allocate);
// Otherwise allocate and initialize a new object.
allocate_instance();
- codegen_->Store(primitive_type, in.W(), HeapOperand(out.W(), info.value_offset));
+ codegen_->Store(type, in.W(), HeapOperand(out.W(), info.value_offset));
// Class pointer and `value` final field stores require a barrier before publication.
codegen_->GenerateMemoryBarrier(MemBarrierKind::kStoreStore);
__ Bind(&done);
diff --git a/compiler/optimizing/intrinsics_arm64.h b/compiler/optimizing/intrinsics_arm64.h
index d198cea8f6..50e2e43f5f 100644
--- a/compiler/optimizing/intrinsics_arm64.h
+++ b/compiler/optimizing/intrinsics_arm64.h
@@ -81,7 +81,7 @@ class IntrinsicCodeGeneratorARM64 final : public IntrinsicVisitor {
void HandleValueOf(HInvoke* invoke,
const IntrinsicVisitor::ValueOfInfo& info,
- DataType::Type primitive_type);
+ DataType::Type type);
CodeGeneratorARM64* const codegen_;
diff --git a/compiler/optimizing/intrinsics_arm_vixl.cc b/compiler/optimizing/intrinsics_arm_vixl.cc
index cfa72e3d70..992f2f4754 100644
--- a/compiler/optimizing/intrinsics_arm_vixl.cc
+++ b/compiler/optimizing/intrinsics_arm_vixl.cc
@@ -2447,13 +2447,13 @@ void IntrinsicCodeGeneratorARMVIXL::VisitMathFloor(HInvoke* invoke) {
} \
void IntrinsicCodeGeneratorARMVIXL::Visit ##name ##ValueOf(HInvoke* invoke) { \
IntrinsicVisitor::ValueOfInfo info = \
- IntrinsicVisitor::ComputeValueOfInfo( \
- invoke, \
- codegen_->GetCompilerOptions(), \
- WellKnownClasses::java_lang_ ##name ##_value, \
- low, \
- high - low + 1, \
- start_index); \
+ IntrinsicVisitor::ComputeValueOfInfo( \
+ invoke, \
+ codegen_->GetCompilerOptions(), \
+ WellKnownClasses::java_lang_ ##name ##_value, \
+ low, \
+ high - low + 1, \
+ start_index); \
HandleValueOf(invoke, info, type); \
}
BOXED_TYPES(VISIT_INTRINSIC)
@@ -2462,7 +2462,7 @@ void IntrinsicCodeGeneratorARMVIXL::VisitMathFloor(HInvoke* invoke) {
void IntrinsicCodeGeneratorARMVIXL::HandleValueOf(HInvoke* invoke,
const IntrinsicVisitor::ValueOfInfo& info,
- DataType::Type primitive_type) {
+ DataType::Type type) {
LocationSummary* locations = invoke->GetLocations();
ArmVIXLAssembler* const assembler = GetAssembler();
@@ -2475,7 +2475,7 @@ void IntrinsicCodeGeneratorARMVIXL::HandleValueOf(HInvoke* invoke,
codegen_->InvokeRuntime(kQuickAllocObjectInitialized, invoke, invoke->GetDexPc());
CheckEntrypointTypes<kQuickAllocObjectWithChecks, void*, mirror::Class*>();
};
- if (invoke->InputAt(0)->IsConstant()) {
+ if (invoke->InputAt(0)->IsIntConstant()) {
int32_t value = invoke->InputAt(0)->AsIntConstant()->GetValue();
if (static_cast<uint32_t>(value - info.low) < info.length) {
// Just embed the object in the code.
@@ -2483,12 +2483,12 @@ void IntrinsicCodeGeneratorARMVIXL::HandleValueOf(HInvoke* invoke,
codegen_->LoadBootImageAddress(out, info.value_boot_image_reference);
} else {
DCHECK(locations->CanCall());
- // Allocate and initialize a new j.l.Integer.
+ // Allocate and initialize a new object.
// TODO: If we JIT, we could allocate the object now, and store it in the
// JIT object table.
allocate_instance();
__ Mov(temp, value);
- assembler->StoreToOffset(GetStoreOperandType(primitive_type), temp, out, info.value_offset);
+ assembler->StoreToOffset(GetStoreOperandType(type), temp, out, info.value_offset);
// Class pointer and `value` final field stores require a barrier before publication.
codegen_->GenerateMemoryBarrier(MemBarrierKind::kStoreStore);
}
@@ -2508,7 +2508,7 @@ void IntrinsicCodeGeneratorARMVIXL::HandleValueOf(HInvoke* invoke,
__ Bind(&allocate);
// Otherwise allocate and initialize a new object.
allocate_instance();
- assembler->StoreToOffset(GetStoreOperandType(primitive_type), in, out, info.value_offset);
+ assembler->StoreToOffset(GetStoreOperandType(type), in, out, info.value_offset);
// Class pointer and `value` final field stores require a barrier before publication.
codegen_->GenerateMemoryBarrier(MemBarrierKind::kStoreStore);
__ Bind(&done);
diff --git a/compiler/optimizing/intrinsics_arm_vixl.h b/compiler/optimizing/intrinsics_arm_vixl.h
index 7757fb56a3..fd86866d4e 100644
--- a/compiler/optimizing/intrinsics_arm_vixl.h
+++ b/compiler/optimizing/intrinsics_arm_vixl.h
@@ -71,7 +71,7 @@ class IntrinsicCodeGeneratorARMVIXL final : public IntrinsicVisitor {
void HandleValueOf(HInvoke* invoke,
const IntrinsicVisitor::ValueOfInfo& info,
- DataType::Type primitive_type);
+ DataType::Type type);
CodeGeneratorARMVIXL* const codegen_;
diff --git a/compiler/optimizing/intrinsics_x86.cc b/compiler/optimizing/intrinsics_x86.cc
index 398e4109dc..288f264003 100644
--- a/compiler/optimizing/intrinsics_x86.cc
+++ b/compiler/optimizing/intrinsics_x86.cc
@@ -3298,13 +3298,13 @@ static void RequestBaseMethodAddressInRegister(HInvoke* invoke) {
} \
void IntrinsicCodeGeneratorX86::Visit ##name ##ValueOf(HInvoke* invoke) { \
IntrinsicVisitor::ValueOfInfo info = \
- IntrinsicVisitor::ComputeValueOfInfo( \
- invoke, \
- codegen_->GetCompilerOptions(), \
- WellKnownClasses::java_lang_ ##name ##_value, \
- low, \
- high - low + 1, \
- start_index); \
+ IntrinsicVisitor::ComputeValueOfInfo( \
+ invoke, \
+ codegen_->GetCompilerOptions(), \
+ WellKnownClasses::java_lang_ ##name ##_value, \
+ low, \
+ high - low + 1, \
+ start_index); \
HandleValueOf(invoke, info, type); \
}
BOXED_TYPES(VISIT_INTRINSIC)
@@ -3312,7 +3312,7 @@ static void RequestBaseMethodAddressInRegister(HInvoke* invoke) {
void IntrinsicCodeGeneratorX86::HandleValueOf(HInvoke* invoke,
const IntrinsicVisitor::ValueOfInfo& info,
- DataType::Type primitive_type) {
+ DataType::Type type) {
DCHECK(invoke->IsInvokeStaticOrDirect());
LocationSummary* locations = invoke->GetLocations();
X86Assembler* assembler = GetAssembler();
@@ -3324,7 +3324,7 @@ void IntrinsicCodeGeneratorX86::HandleValueOf(HInvoke* invoke,
codegen_->InvokeRuntime(kQuickAllocObjectInitialized, invoke, invoke->GetDexPc());
CheckEntrypointTypes<kQuickAllocObjectWithChecks, void*, mirror::Class*>();
};
- if (invoke->InputAt(0)->IsConstant()) {
+ if (invoke->InputAt(0)->IsIntConstant()) {
int32_t value = invoke->InputAt(0)->AsIntConstant()->GetValue();
if (static_cast<uint32_t>(value - info.low) < info.length) {
// Just embed the object in the code.
@@ -3337,7 +3337,7 @@ void IntrinsicCodeGeneratorX86::HandleValueOf(HInvoke* invoke,
// TODO: If we JIT, we could allocate the object now, and store it in the
// JIT object table.
allocate_instance();
- codegen_->MoveToMemory(primitive_type,
+ codegen_->MoveToMemory(type,
Location::ConstantLocation(invoke->InputAt(0)->AsIntConstant()),
out,
/* dst_index= */ Register::kNoRegister,
@@ -3382,7 +3382,7 @@ void IntrinsicCodeGeneratorX86::HandleValueOf(HInvoke* invoke,
__ Bind(&allocate);
// Otherwise allocate and initialize a new object.
allocate_instance();
- codegen_->MoveToMemory(primitive_type,
+ codegen_->MoveToMemory(type,
Location::RegisterLocation(in),
out,
/* dst_index= */ Register::kNoRegister,
diff --git a/compiler/optimizing/intrinsics_x86.h b/compiler/optimizing/intrinsics_x86.h
index b4f07e90d1..289a3c342c 100644
--- a/compiler/optimizing/intrinsics_x86.h
+++ b/compiler/optimizing/intrinsics_x86.h
@@ -73,7 +73,7 @@ class IntrinsicCodeGeneratorX86 final : public IntrinsicVisitor {
void HandleValueOf(HInvoke* invoke,
const IntrinsicVisitor::ValueOfInfo& info,
- DataType::Type primitive_type);
+ DataType::Type type);
CodeGeneratorX86* const codegen_;
diff --git a/compiler/optimizing/intrinsics_x86_64.cc b/compiler/optimizing/intrinsics_x86_64.cc
index 4eb89811cd..4b8c722725 100644
--- a/compiler/optimizing/intrinsics_x86_64.cc
+++ b/compiler/optimizing/intrinsics_x86_64.cc
@@ -3069,13 +3069,13 @@ void IntrinsicCodeGeneratorX86_64::VisitLongNumberOfTrailingZeros(HInvoke* invok
} \
void IntrinsicCodeGeneratorX86_64::Visit ##name ##ValueOf(HInvoke* invoke) { \
IntrinsicVisitor::ValueOfInfo info = \
- IntrinsicVisitor::ComputeValueOfInfo( \
- invoke, \
- codegen_->GetCompilerOptions(), \
- WellKnownClasses::java_lang_ ##name ##_value, \
- low, \
- high - low + 1, \
- start_index); \
+ IntrinsicVisitor::ComputeValueOfInfo( \
+ invoke, \
+ codegen_->GetCompilerOptions(), \
+ WellKnownClasses::java_lang_ ##name ##_value, \
+ low, \
+ high - low + 1, \
+ start_index); \
HandleValueOf(invoke, info, type); \
}
BOXED_TYPES(VISIT_INTRINSIC)
@@ -3109,7 +3109,7 @@ static void Store(X86_64Assembler* assembler,
void IntrinsicCodeGeneratorX86_64::HandleValueOf(HInvoke* invoke,
const IntrinsicVisitor::ValueOfInfo& info,
- DataType::Type primitive_type) {
+ DataType::Type type) {
LocationSummary* locations = invoke->GetLocations();
X86_64Assembler* assembler = GetAssembler();
@@ -3121,19 +3121,19 @@ void IntrinsicCodeGeneratorX86_64::HandleValueOf(HInvoke* invoke,
codegen_->InvokeRuntime(kQuickAllocObjectInitialized, invoke, invoke->GetDexPc());
CheckEntrypointTypes<kQuickAllocObjectWithChecks, void*, mirror::Class*>();
};
- if (invoke->InputAt(0)->IsConstant()) {
+ if (invoke->InputAt(0)->IsIntConstant()) {
int32_t value = invoke->InputAt(0)->AsIntConstant()->GetValue();
if (static_cast<uint32_t>(value - info.low) < info.length) {
- // Just embed the j.l.Integer in the code.
+ // Just embed the object in the code.
DCHECK_NE(info.value_boot_image_reference, ValueOfInfo::kInvalidReference);
codegen_->LoadBootImageAddress(out, info.value_boot_image_reference);
} else {
DCHECK(locations->CanCall());
- // Allocate and initialize a new j.l.Integer.
+ // Allocate and initialize a new object.
// TODO: If we JIT, we could allocate the boxed value now, and store it in the
// JIT object table.
allocate_instance();
- Store(assembler, primitive_type, Address(out, info.value_offset), Immediate(value));
+ Store(assembler, type, Address(out, info.value_offset), Immediate(value));
}
} else {
DCHECK(locations->CanCall());
@@ -3154,7 +3154,7 @@ void IntrinsicCodeGeneratorX86_64::HandleValueOf(HInvoke* invoke,
__ Bind(&allocate);
// Otherwise allocate and initialize a new object.
allocate_instance();
- Store(assembler, primitive_type, Address(out, info.value_offset), in);
+ Store(assembler, type, Address(out, info.value_offset), in);
__ Bind(&done);
}
}
diff --git a/compiler/optimizing/intrinsics_x86_64.h b/compiler/optimizing/intrinsics_x86_64.h
index 652a7d1d5c..4a76c5c8ec 100644
--- a/compiler/optimizing/intrinsics_x86_64.h
+++ b/compiler/optimizing/intrinsics_x86_64.h
@@ -73,7 +73,7 @@ class IntrinsicCodeGeneratorX86_64 final : public IntrinsicVisitor {
void HandleValueOf(HInvoke* invoke,
const IntrinsicVisitor::ValueOfInfo& info,
- DataType::Type primitive_type);
+ DataType::Type type);
CodeGeneratorX86_64* const codegen_;