Directory restructuring of object.h
Break object.h into constituent files.
Reduce number of #includes in other GC header files.
Introduce -inl.h files to avoid mirror files #include-ing each other.
Check invariants of verifier RegTypes for all constructors.
Change-Id: Iecf1171c02910ac152d52947330ef456df4043bc
diff --git a/src/compiler/codegen/arm/call_arm.cc b/src/compiler/codegen/arm/call_arm.cc
index cb3af5e..47306f4 100644
--- a/src/compiler/codegen/arm/call_arm.cc
+++ b/src/compiler/codegen/arm/call_arm.cc
@@ -489,7 +489,7 @@
GenNullCheck(cu, rl_src.s_reg_low, r0, opt_flags);
LoadWordDisp(cu, rARM_SELF, Thread::ThinLockIdOffset().Int32Value(), r2);
NewLIR3(cu, kThumb2Ldrex, r1, r0,
- Object::MonitorOffset().Int32Value() >> 2); // Get object->lock
+ mirror::Object::MonitorOffset().Int32Value() >> 2); // Get object->lock
// Align owner
OpRegImm(cu, kOpLsl, r2, LW_LOCK_OWNER_SHIFT);
// Is lock unheld on lock or held by us (==thread_id) on unlock?
@@ -498,7 +498,7 @@
OpRegImm(cu, kOpCmp, r1, 0);
OpIT(cu, kCondEq, "");
NewLIR4(cu, kThumb2Strex, r1, r2, r0,
- Object::MonitorOffset().Int32Value() >> 2);
+ mirror::Object::MonitorOffset().Int32Value() >> 2);
OpRegImm(cu, kOpCmp, r1, 0);
OpIT(cu, kCondNe, "T");
// Go expensive route - artLockObjectFromCode(self, obj);
@@ -522,7 +522,7 @@
LoadValueDirectFixed(cu, rl_src, r0); // Get obj
LockCallTemps(cu); // Prepare for explicit register usage
GenNullCheck(cu, rl_src.s_reg_low, r0, opt_flags);
- LoadWordDisp(cu, r0, Object::MonitorOffset().Int32Value(), r1); // Get lock
+ LoadWordDisp(cu, r0, mirror::Object::MonitorOffset().Int32Value(), r1); // Get lock
LoadWordDisp(cu, rARM_SELF, Thread::ThinLockIdOffset().Int32Value(), r2);
// Is lock unheld on lock or held by us (==thread_id) on unlock?
OpRegRegImm(cu, kOpAnd, r3, r1,
@@ -532,7 +532,7 @@
NewLIR3(cu, kThumb2Bfc, r1, LW_HASH_STATE_SHIFT, LW_LOCK_OWNER_SHIFT - 1);
OpRegReg(cu, kOpSub, r1, r2);
OpIT(cu, kCondEq, "EE");
- StoreWordDisp(cu, r0, Object::MonitorOffset().Int32Value(), r3);
+ StoreWordDisp(cu, r0, mirror::Object::MonitorOffset().Int32Value(), r3);
// Go expensive route - UnlockObjectFromCode(obj);
LoadWordDisp(cu, rARM_SELF, ENTRYPOINT_OFFSET(pUnlockObjectFromCode), rARM_LR);
ClobberCalleeSave(cu);
diff --git a/src/compiler/codegen/arm/int_arm.cc b/src/compiler/codegen/arm/int_arm.cc
index e86f379..6a1178e 100644
--- a/src/compiler/codegen/arm/int_arm.cc
+++ b/src/compiler/codegen/arm/int_arm.cc
@@ -565,16 +565,16 @@
RegLocation rl_index, RegLocation rl_dest, int scale)
{
RegisterClass reg_class = oat_reg_class_by_size(size);
- int len_offset = Array::LengthOffset().Int32Value();
+ int len_offset = mirror::Array::LengthOffset().Int32Value();
int data_offset;
RegLocation rl_result;
rl_array = LoadValue(cu, rl_array, kCoreReg);
rl_index = LoadValue(cu, rl_index, kCoreReg);
if (rl_dest.wide) {
- data_offset = Array::DataOffset(sizeof(int64_t)).Int32Value();
+ data_offset = mirror::Array::DataOffset(sizeof(int64_t)).Int32Value();
} else {
- data_offset = Array::DataOffset(sizeof(int32_t)).Int32Value();
+ data_offset = mirror::Array::DataOffset(sizeof(int32_t)).Int32Value();
}
/* null object? */
@@ -637,13 +637,13 @@
RegLocation rl_index, RegLocation rl_src, int scale)
{
RegisterClass reg_class = oat_reg_class_by_size(size);
- int len_offset = Array::LengthOffset().Int32Value();
+ int len_offset = mirror::Array::LengthOffset().Int32Value();
int data_offset;
if (size == kLong || size == kDouble) {
- data_offset = Array::DataOffset(sizeof(int64_t)).Int32Value();
+ data_offset = mirror::Array::DataOffset(sizeof(int64_t)).Int32Value();
} else {
- data_offset = Array::DataOffset(sizeof(int32_t)).Int32Value();
+ data_offset = mirror::Array::DataOffset(sizeof(int32_t)).Int32Value();
}
rl_array = LoadValue(cu, rl_array, kCoreReg);
@@ -706,8 +706,8 @@
void ArmCodegen::GenArrayObjPut(CompilationUnit* cu, int opt_flags, RegLocation rl_array,
RegLocation rl_index, RegLocation rl_src, int scale)
{
- int len_offset = Array::LengthOffset().Int32Value();
- int data_offset = Array::DataOffset(sizeof(Object*)).Int32Value();
+ int len_offset = mirror::Array::LengthOffset().Int32Value();
+ int data_offset = mirror::Array::DataOffset(sizeof(mirror::Object*)).Int32Value();
FlushAllRegs(cu); // Use explicit registers
LockCallTemps(cu);
@@ -727,7 +727,7 @@
LIR* null_value_check = OpCmpImmBranch(cu, kCondEq, r_value, 0, NULL);
// Get the array's class.
- LoadWordDisp(cu, r_array, Object::ClassOffset().Int32Value(), r_array_class);
+ LoadWordDisp(cu, r_array, mirror::Object::ClassOffset().Int32Value(), r_array_class);
CallRuntimeHelperRegReg(cu, ENTRYPOINT_OFFSET(pCanPutArrayElementFromCode), r_value,
r_array_class, true);
// Redo LoadValues in case they didn't survive the call.
diff --git a/src/compiler/codegen/gen_common.cc b/src/compiler/codegen/gen_common.cc
index e1054db..acaad5b 100644
--- a/src/compiler/codegen/gen_common.cc
+++ b/src/compiler/codegen/gen_common.cc
@@ -330,7 +330,7 @@
SRegOffset(cu, rl_first.s_reg_low));
// Set up the target pointer
OpRegRegImm(cu, kOpAdd, r_dst, TargetReg(kRet0),
- Array::DataOffset(component_size).Int32Value());
+ mirror::Array::DataOffset(component_size).Int32Value());
// Set up the loop counter (known to be > 0)
LoadConstant(cu, r_idx, elems - 1);
// Generate the copy loop. Going backwards for convenience
@@ -342,14 +342,15 @@
OpDecAndBranch(cu, kCondGe, r_idx, target);
if (cu->instruction_set == kX86) {
// Restore the target pointer
- OpRegRegImm(cu, kOpAdd, TargetReg(kRet0), r_dst, -Array::DataOffset(component_size).Int32Value());
+ OpRegRegImm(cu, kOpAdd, TargetReg(kRet0), r_dst,
+ -mirror::Array::DataOffset(component_size).Int32Value());
}
} else if (!info->is_range) {
// TUNING: interleave
for (int i = 0; i < elems; i++) {
RegLocation rl_arg = LoadValue(cu, info->args[i], kCoreReg);
StoreBaseDisp(cu, TargetReg(kRet0),
- Array::DataOffset(component_size).Int32Value() +
+ mirror::Array::DataOffset(component_size).Int32Value() +
i * 4, rl_arg.low_reg, kWord);
// If the LoadValue caused a temp to be allocated, free it
if (IsTemp(cu, rl_arg.low_reg)) {
@@ -386,7 +387,7 @@
RegLocation rl_method = LoadCurrMethod(cu);
rBase = AllocTemp(cu);
LoadWordDisp(cu, rl_method.low_reg,
- AbstractMethod::DeclaringClassOffset().Int32Value(), rBase);
+ mirror::AbstractMethod::DeclaringClassOffset().Int32Value(), rBase);
if (IsTemp(cu, rl_method.low_reg)) {
FreeTemp(cu, rl_method.low_reg);
}
@@ -404,10 +405,10 @@
rBase = TargetReg(kArg0);
LockTemp(cu, rBase);
LoadWordDisp(cu, r_method,
- AbstractMethod::DexCacheInitializedStaticStorageOffset().Int32Value(),
+ mirror::AbstractMethod::DexCacheInitializedStaticStorageOffset().Int32Value(),
rBase);
LoadWordDisp(cu, rBase,
- Array::DataOffset(sizeof(Object*)).Int32Value() +
+ mirror::Array::DataOffset(sizeof(mirror::Object*)).Int32Value() +
sizeof(int32_t*) * ssb_index, rBase);
// rBase now points at appropriate static storage base (Class*)
// or NULL if not initialized. Check for NULL and call helper if NULL.
@@ -480,7 +481,7 @@
RegLocation rl_method = LoadCurrMethod(cu);
rBase = AllocTemp(cu);
LoadWordDisp(cu, rl_method.low_reg,
- AbstractMethod::DeclaringClassOffset().Int32Value(), rBase);
+ mirror::AbstractMethod::DeclaringClassOffset().Int32Value(), rBase);
} else {
// Medium path, static storage base in a different class which
// requires checks that the other class is initialized
@@ -495,10 +496,10 @@
rBase = TargetReg(kArg0);
LockTemp(cu, rBase);
LoadWordDisp(cu, r_method,
- AbstractMethod::DexCacheInitializedStaticStorageOffset().Int32Value(),
+ mirror::AbstractMethod::DexCacheInitializedStaticStorageOffset().Int32Value(),
rBase);
LoadWordDisp(cu, rBase,
- Array::DataOffset(sizeof(Object*)).Int32Value() +
+ mirror::Array::DataOffset(sizeof(mirror::Object*)).Int32Value() +
sizeof(int32_t*) * ssb_index, rBase);
// rBase now points at appropriate static storage base (Class*)
// or NULL if not initialized. Check for NULL and call helper if NULL.
@@ -619,7 +620,7 @@
OpRegCopy(cu, TargetReg(kArg0), v1);
if (target_x86) {
// x86 leaves the array pointer in v2, so load the array length that the handler expects
- OpRegMem(cu, kOpMov, TargetReg(kArg1), v2, Array::LengthOffset().Int32Value());
+ OpRegMem(cu, kOpMov, TargetReg(kArg1), v2, mirror::Array::LengthOffset().Int32Value());
} else {
OpRegCopy(cu, TargetReg(kArg1), v2);
}
@@ -629,7 +630,7 @@
OpRegCopy(cu, TargetReg(kArg2), v1);
if (target_x86) {
// x86 leaves the array pointer in v2; load the array length that the handler expects
- OpRegMem(cu, kOpMov, TargetReg(kArg1), v2, Array::LengthOffset().Int32Value());
+ OpRegMem(cu, kOpMov, TargetReg(kArg1), v2, mirror::Array::LengthOffset().Int32Value());
} else {
OpRegCopy(cu, TargetReg(kArg1), v2);
}
@@ -637,7 +638,7 @@
} else {
if (target_x86) {
// x86 leaves the array pointer in v2; load the array length that the handler expects
- OpRegMem(cu, kOpMov, TargetReg(kArg1), v2, Array::LengthOffset().Int32Value());
+ OpRegMem(cu, kOpMov, TargetReg(kArg1), v2, mirror::Array::LengthOffset().Int32Value());
} else {
OpRegCopy(cu, TargetReg(kArg1), v2);
}
@@ -799,10 +800,10 @@
} else {
// We're don't need access checks, load type from dex cache
int32_t dex_cache_offset =
- AbstractMethod::DexCacheResolvedTypesOffset().Int32Value();
+ mirror::AbstractMethod::DexCacheResolvedTypesOffset().Int32Value();
LoadWordDisp(cu, rl_method.low_reg, dex_cache_offset, res_reg);
int32_t offset_of_type =
- Array::DataOffset(sizeof(Class*)).Int32Value() + (sizeof(Class*)
+ mirror::Array::DataOffset(sizeof(mirror::Class*)).Int32Value() + (sizeof(mirror::Class*)
* type_idx);
LoadWordDisp(cu, res_reg, offset_of_type, rl_result.low_reg);
if (!cu->compiler->CanAssumeTypeIsPresentInDexCache(*cu->dex_file,
@@ -844,8 +845,8 @@
void Codegen::GenConstString(CompilationUnit* cu, uint32_t string_idx, RegLocation rl_dest)
{
/* NOTE: Most strings should be available at compile time */
- int32_t offset_of_string = Array::DataOffset(sizeof(String*)).Int32Value() +
- (sizeof(String*) * string_idx);
+ int32_t offset_of_string = mirror::Array::DataOffset(sizeof(mirror::String*)).Int32Value() +
+ (sizeof(mirror::String*) * string_idx);
if (!cu->compiler->CanAssumeStringIsPresentInDexCache(
*cu->dex_file, string_idx) || SLOW_STRING_PATH) {
// slow path, resolve string if not in dex cache
@@ -853,7 +854,7 @@
LockCallTemps(cu); // Using explicit registers
LoadCurrMethodDirect(cu, TargetReg(kArg2));
LoadWordDisp(cu, TargetReg(kArg2),
- AbstractMethod::DexCacheStringsOffset().Int32Value(), TargetReg(kArg0));
+ mirror::AbstractMethod::DexCacheStringsOffset().Int32Value(), TargetReg(kArg0));
// Might call out to helper, which will return resolved string in kRet0
int r_tgt = CallHelperSetup(cu, ENTRYPOINT_OFFSET(pResolveStringFromCode));
LoadWordDisp(cu, TargetReg(kArg0), offset_of_string, TargetReg(kRet0));
@@ -888,7 +889,7 @@
int res_reg = AllocTemp(cu);
RegLocation rl_result = EvalLoc(cu, rl_dest, kCoreReg, true);
LoadWordDisp(cu, rl_method.low_reg,
- AbstractMethod::DexCacheStringsOffset().Int32Value(), res_reg);
+ mirror::AbstractMethod::DexCacheStringsOffset().Int32Value(), res_reg);
LoadWordDisp(cu, res_reg, offset_of_string, rl_result.low_reg);
StoreValue(cu, rl_dest, rl_result);
}
@@ -942,9 +943,9 @@
// Load dex cache entry into class_reg (kArg2)
LoadValueDirectFixed(cu, rl_src, TargetReg(kArg0)); // kArg0 <= ref
LoadWordDisp(cu, TargetReg(kArg1),
- AbstractMethod::DexCacheResolvedTypesOffset().Int32Value(), class_reg);
+ mirror::AbstractMethod::DexCacheResolvedTypesOffset().Int32Value(), class_reg);
int32_t offset_of_type =
- Array::DataOffset(sizeof(Class*)).Int32Value() + (sizeof(Class*)
+ mirror::Array::DataOffset(sizeof(mirror::Class*)).Int32Value() + (sizeof(mirror::Class*)
* type_idx);
LoadWordDisp(cu, class_reg, offset_of_type, class_reg);
if (!cu->compiler->CanAssumeTypeIsPresentInDexCache(
@@ -968,8 +969,8 @@
}
LIR* branch1 = OpCmpImmBranch(cu, kCondEq, TargetReg(kArg0), 0, NULL);
/* load object->klass_ */
- DCHECK_EQ(Object::ClassOffset().Int32Value(), 0);
- LoadWordDisp(cu, TargetReg(kArg0), Object::ClassOffset().Int32Value(), TargetReg(kArg1));
+ DCHECK_EQ(mirror::Object::ClassOffset().Int32Value(), 0);
+ LoadWordDisp(cu, TargetReg(kArg0), mirror::Object::ClassOffset().Int32Value(), TargetReg(kArg1));
/* kArg0 is ref, kArg1 is ref->klass_, kArg2 is class */
LIR* call_inst;
LIR* branchover = NULL;
@@ -1026,10 +1027,10 @@
} else {
// Load dex cache entry into class_reg (kArg2)
LoadWordDisp(cu, TargetReg(kArg1),
- AbstractMethod::DexCacheResolvedTypesOffset().Int32Value(), class_reg);
+ mirror::AbstractMethod::DexCacheResolvedTypesOffset().Int32Value(), class_reg);
int32_t offset_of_type =
- Array::DataOffset(sizeof(Class*)).Int32Value() +
- (sizeof(Class*) * type_idx);
+ mirror::Array::DataOffset(sizeof(mirror::Class*)).Int32Value() +
+ (sizeof(mirror::Class*) * type_idx);
LoadWordDisp(cu, class_reg, offset_of_type, class_reg);
if (!cu->compiler->CanAssumeTypeIsPresentInDexCache(
*cu->dex_file, type_idx)) {
@@ -1051,8 +1052,8 @@
/* Null is OK - continue */
LIR* branch1 = OpCmpImmBranch(cu, kCondEq, TargetReg(kArg0), 0, NULL);
/* load object->klass_ */
- DCHECK_EQ(Object::ClassOffset().Int32Value(), 0);
- LoadWordDisp(cu, TargetReg(kArg0), Object::ClassOffset().Int32Value(), TargetReg(kArg1));
+ DCHECK_EQ(mirror::Object::ClassOffset().Int32Value(), 0);
+ LoadWordDisp(cu, TargetReg(kArg0), mirror::Object::ClassOffset().Int32Value(), TargetReg(kArg1));
/* kArg1 now contains object->klass_ */
LIR* branch2;
if (cu->instruction_set == kThumb2) {
diff --git a/src/compiler/codegen/gen_invoke.cc b/src/compiler/codegen/gen_invoke.cc
index fe60aff..78425c4 100644
--- a/src/compiler/codegen/gen_invoke.cc
+++ b/src/compiler/codegen/gen_invoke.cc
@@ -365,7 +365,7 @@
break;
case 1: // Get method->dex_cache_resolved_methods_
cg->LoadWordDisp(cu, cg->TargetReg(kArg0),
- AbstractMethod::DexCacheResolvedMethodsOffset().Int32Value(), cg->TargetReg(kArg0));
+ mirror::AbstractMethod::DexCacheResolvedMethodsOffset().Int32Value(), cg->TargetReg(kArg0));
// Set up direct code if known.
if (direct_code != 0) {
if (direct_code != static_cast<unsigned int>(-1)) {
@@ -384,13 +384,14 @@
break;
case 2: // Grab target method*
cg->LoadWordDisp(cu, cg->TargetReg(kArg0),
- Array::DataOffset(sizeof(Object*)).Int32Value() + dex_idx * 4,
+ mirror::Array::DataOffset(sizeof(mirror::Object*)).Int32Value() + dex_idx * 4,
cg-> TargetReg(kArg0));
break;
case 3: // Grab the code from the method*
if (cu->instruction_set != kX86) {
if (direct_code == 0) {
- cg->LoadWordDisp(cu, cg->TargetReg(kArg0), AbstractMethod::GetCodeOffset().Int32Value(),
+ cg->LoadWordDisp(cu, cg->TargetReg(kArg0),
+ mirror::AbstractMethod::GetCodeOffset().Int32Value(),
cg->TargetReg(kInvokeTgt));
}
break;
@@ -428,20 +429,22 @@
case 1: // Is "this" null? [use kArg1]
cg->GenNullCheck(cu, info->args[0].s_reg_low, cg->TargetReg(kArg1), info->opt_flags);
// get this->klass_ [use kArg1, set kInvokeTgt]
- cg->LoadWordDisp(cu, cg->TargetReg(kArg1), Object::ClassOffset().Int32Value(),
+ cg->LoadWordDisp(cu, cg->TargetReg(kArg1), mirror::Object::ClassOffset().Int32Value(),
cg->TargetReg(kInvokeTgt));
break;
case 2: // Get this->klass_->vtable [usr kInvokeTgt, set kInvokeTgt]
- cg->LoadWordDisp(cu, cg->TargetReg(kInvokeTgt), Class::VTableOffset().Int32Value(),
+ cg->LoadWordDisp(cu, cg->TargetReg(kInvokeTgt), mirror::Class::VTableOffset().Int32Value(),
cg->TargetReg(kInvokeTgt));
break;
case 3: // Get target method [use kInvokeTgt, set kArg0]
cg->LoadWordDisp(cu, cg->TargetReg(kInvokeTgt), (method_idx * 4) +
- Array::DataOffset(sizeof(Object*)).Int32Value(), cg->TargetReg(kArg0));
+ mirror::Array::DataOffset(sizeof(mirror::Object*)).Int32Value(),
+ cg->TargetReg(kArg0));
break;
case 4: // Get the compiled code address [uses kArg0, sets kInvokeTgt]
if (cu->instruction_set != kX86) {
- cg->LoadWordDisp(cu, cg->TargetReg(kArg0), AbstractMethod::GetCodeOffset().Int32Value(),
+ cg->LoadWordDisp(cu, cg->TargetReg(kArg0),
+ mirror::AbstractMethod::GetCodeOffset().Int32Value(),
cg->TargetReg(kInvokeTgt));
break;
}
@@ -503,12 +506,12 @@
break;
case 1: // Get method->dex_cache_resolved_methods_ [set/use kArg0]
cg->LoadWordDisp(cu, cg->TargetReg(kArg0),
- AbstractMethod::DexCacheResolvedMethodsOffset().Int32Value(),
+ mirror::AbstractMethod::DexCacheResolvedMethodsOffset().Int32Value(),
cg->TargetReg(kArg0));
break;
case 2: // Grab target method* [set/use kArg0]
cg->LoadWordDisp(cu, cg->TargetReg(kArg0),
- Array::DataOffset(sizeof(Object*)).Int32Value() + dex_idx * 4,
+ mirror::Array::DataOffset(sizeof(mirror::Object*)).Int32Value() + dex_idx * 4,
cg->TargetReg(kArg0));
break;
default:
@@ -837,13 +840,13 @@
return false;
}
// Location of reference to data array
- int value_offset = String::ValueOffset().Int32Value();
+ int value_offset = mirror::String::ValueOffset().Int32Value();
// Location of count
- int count_offset = String::CountOffset().Int32Value();
+ int count_offset = mirror::String::CountOffset().Int32Value();
// Starting offset within data array
- int offset_offset = String::OffsetOffset().Int32Value();
+ int offset_offset = mirror::String::OffsetOffset().Int32Value();
// Start of char data with array_
- int data_offset = Array::DataOffset(sizeof(uint16_t)).Int32Value();
+ int data_offset = mirror::Array::DataOffset(sizeof(uint16_t)).Int32Value();
RegLocation rl_obj = info->args[0];
RegLocation rl_idx = info->args[1];
@@ -921,7 +924,7 @@
RegLocation rl_dest = InlineTarget(cu, info);
RegLocation rl_result = EvalLoc(cu, rl_dest, kCoreReg, true);
GenNullCheck(cu, rl_obj.s_reg_low, rl_obj.low_reg, info->opt_flags);
- LoadWordDisp(cu, rl_obj.low_reg, String::CountOffset().Int32Value(),
+ LoadWordDisp(cu, rl_obj.low_reg, mirror::String::CountOffset().Int32Value(),
rl_result.low_reg);
if (is_empty) {
// dst = (dst == 0);
@@ -1284,7 +1287,7 @@
} else {
if (fast_path && info->type != kInterface) {
call_inst = OpMem(cu, kOpBlx, TargetReg(kArg0),
- AbstractMethod::GetCodeOffset().Int32Value());
+ mirror::AbstractMethod::GetCodeOffset().Int32Value());
} else {
int trampoline = 0;
switch (info->type) {
diff --git a/src/compiler/codegen/mips/int_mips.cc b/src/compiler/codegen/mips/int_mips.cc
index e2a5a02..86f0527 100644
--- a/src/compiler/codegen/mips/int_mips.cc
+++ b/src/compiler/codegen/mips/int_mips.cc
@@ -439,16 +439,16 @@
RegLocation rl_index, RegLocation rl_dest, int scale)
{
RegisterClass reg_class = oat_reg_class_by_size(size);
- int len_offset = Array::LengthOffset().Int32Value();
+ int len_offset = mirror::Array::LengthOffset().Int32Value();
int data_offset;
RegLocation rl_result;
rl_array = LoadValue(cu, rl_array, kCoreReg);
rl_index = LoadValue(cu, rl_index, kCoreReg);
if (size == kLong || size == kDouble) {
- data_offset = Array::DataOffset(sizeof(int64_t)).Int32Value();
+ data_offset = mirror::Array::DataOffset(sizeof(int64_t)).Int32Value();
} else {
- data_offset = Array::DataOffset(sizeof(int32_t)).Int32Value();
+ data_offset = mirror::Array::DataOffset(sizeof(int32_t)).Int32Value();
}
/* null object? */
@@ -511,13 +511,13 @@
RegLocation rl_index, RegLocation rl_src, int scale)
{
RegisterClass reg_class = oat_reg_class_by_size(size);
- int len_offset = Array::LengthOffset().Int32Value();
+ int len_offset = mirror::Array::LengthOffset().Int32Value();
int data_offset;
if (size == kLong || size == kDouble) {
- data_offset = Array::DataOffset(sizeof(int64_t)).Int32Value();
+ data_offset = mirror::Array::DataOffset(sizeof(int64_t)).Int32Value();
} else {
- data_offset = Array::DataOffset(sizeof(int32_t)).Int32Value();
+ data_offset = mirror::Array::DataOffset(sizeof(int32_t)).Int32Value();
}
rl_array = LoadValue(cu, rl_array, kCoreReg);
@@ -583,8 +583,8 @@
void MipsCodegen::GenArrayObjPut(CompilationUnit* cu, int opt_flags, RegLocation rl_array,
RegLocation rl_index, RegLocation rl_src, int scale)
{
- int len_offset = Array::LengthOffset().Int32Value();
- int data_offset = Array::DataOffset(sizeof(Object*)).Int32Value();
+ int len_offset = mirror::Array::LengthOffset().Int32Value();
+ int data_offset = mirror::Array::DataOffset(sizeof(mirror::Object*)).Int32Value();
FlushAllRegs(cu); // Use explicit registers
LockCallTemps(cu);
@@ -604,7 +604,7 @@
LIR* null_value_check = OpCmpImmBranch(cu, kCondEq, r_value, 0, NULL);
// Get the array's class.
- LoadWordDisp(cu, r_array, Object::ClassOffset().Int32Value(), r_array_class);
+ LoadWordDisp(cu, r_array, mirror::Object::ClassOffset().Int32Value(), r_array_class);
CallRuntimeHelperRegReg(cu, ENTRYPOINT_OFFSET(pCanPutArrayElementFromCode), r_value,
r_array_class, true);
// Redo LoadValues in case they didn't survive the call.
diff --git a/src/compiler/codegen/mir_to_gbc.cc b/src/compiler/codegen/mir_to_gbc.cc
index e38977a..2657b79 100644
--- a/src/compiler/codegen/mir_to_gbc.cc
+++ b/src/compiler/codegen/mir_to_gbc.cc
@@ -2684,7 +2684,7 @@
cg->GenNullCheck(cu, rl_src.s_reg_low, rl_src.low_reg, opt_flags->getZExtValue());
RegLocation rl_dest = GetLoc(cu, call_inst);
RegLocation rl_result = EvalLoc(cu, rl_dest, kCoreReg, true);
- int len_offset = Array::LengthOffset().Int32Value();
+ int len_offset = mirror::Array::LengthOffset().Int32Value();
cg->LoadWordDisp(cu, rl_src.low_reg, len_offset, rl_result.low_reg);
cg->StoreValue(cu, rl_dest, rl_result);
}
diff --git a/src/compiler/codegen/mir_to_lir.cc b/src/compiler/codegen/mir_to_lir.cc
index 2bc0f86..77d581f 100644
--- a/src/compiler/codegen/mir_to_lir.cc
+++ b/src/compiler/codegen/mir_to_lir.cc
@@ -210,7 +210,7 @@
case Instruction::ARRAY_LENGTH:
int len_offset;
- len_offset = Array::LengthOffset().Int32Value();
+ len_offset = mirror::Array::LengthOffset().Int32Value();
rl_src[0] = cg->LoadValue(cu, rl_src[0], kCoreReg);
cg->GenNullCheck(cu, rl_src[0].s_reg_low, rl_src[0].low_reg, opt_flags);
rl_result = EvalLoc(cu, rl_dest, kCoreReg, true);
diff --git a/src/compiler/codegen/x86/call_x86.cc b/src/compiler/codegen/x86/call_x86.cc
index 727c5e8..f9b25c8 100644
--- a/src/compiler/codegen/x86/call_x86.cc
+++ b/src/compiler/codegen/x86/call_x86.cc
@@ -163,7 +163,7 @@
NewLIR2(cu, kX86Mov32RT, rDX, Thread::ThinLockIdOffset().Int32Value());
NewLIR2(cu, kX86Sal32RI, rDX, LW_LOCK_OWNER_SHIFT);
NewLIR2(cu, kX86Xor32RR, rAX, rAX);
- NewLIR3(cu, kX86LockCmpxchgMR, rCX, Object::MonitorOffset().Int32Value(), rDX);
+ NewLIR3(cu, kX86LockCmpxchgMR, rCX, mirror::Object::MonitorOffset().Int32Value(), rDX);
LIR* branch = NewLIR2(cu, kX86Jcc8, 0, kX86CondEq);
// If lock is held, go the expensive route - artLockObjectFromCode(self, obj);
CallRuntimeHelperReg(cu, ENTRYPOINT_OFFSET(pLockObjectFromCode), rCX, true);
@@ -180,10 +180,10 @@
// TODO: clear hash state?
NewLIR2(cu, kX86Mov32RT, rDX, Thread::ThinLockIdOffset().Int32Value());
NewLIR2(cu, kX86Sal32RI, rDX, LW_LOCK_OWNER_SHIFT);
- NewLIR3(cu, kX86Mov32RM, rCX, rAX, Object::MonitorOffset().Int32Value());
+ NewLIR3(cu, kX86Mov32RM, rCX, rAX, mirror::Object::MonitorOffset().Int32Value());
OpRegReg(cu, kOpSub, rCX, rDX);
LIR* branch = NewLIR2(cu, kX86Jcc8, 0, kX86CondNe);
- NewLIR3(cu, kX86Mov32MR, rAX, Object::MonitorOffset().Int32Value(), rCX);
+ NewLIR3(cu, kX86Mov32MR, rAX, mirror::Object::MonitorOffset().Int32Value(), rCX);
LIR* branch2 = NewLIR1(cu, kX86Jmp8, 0);
branch->target = NewLIR0(cu, kPseudoTargetLabel);
// Otherwise, go the expensive route - UnlockObjectFromCode(obj);
diff --git a/src/compiler/codegen/x86/int_x86.cc b/src/compiler/codegen/x86/int_x86.cc
index 0f1fc53..f2d023c 100644
--- a/src/compiler/codegen/x86/int_x86.cc
+++ b/src/compiler/codegen/x86/int_x86.cc
@@ -446,16 +446,16 @@
RegLocation rl_index, RegLocation rl_dest, int scale)
{
RegisterClass reg_class = oat_reg_class_by_size(size);
- int len_offset = Array::LengthOffset().Int32Value();
+ int len_offset = mirror::Array::LengthOffset().Int32Value();
int data_offset;
RegLocation rl_result;
rl_array = LoadValue(cu, rl_array, kCoreReg);
rl_index = LoadValue(cu, rl_index, kCoreReg);
if (size == kLong || size == kDouble) {
- data_offset = Array::DataOffset(sizeof(int64_t)).Int32Value();
+ data_offset = mirror::Array::DataOffset(sizeof(int64_t)).Int32Value();
} else {
- data_offset = Array::DataOffset(sizeof(int32_t)).Int32Value();
+ data_offset = mirror::Array::DataOffset(sizeof(int32_t)).Int32Value();
}
/* null object? */
@@ -494,13 +494,13 @@
RegLocation rl_index, RegLocation rl_src, int scale)
{
RegisterClass reg_class = oat_reg_class_by_size(size);
- int len_offset = Array::LengthOffset().Int32Value();
+ int len_offset = mirror::Array::LengthOffset().Int32Value();
int data_offset;
if (size == kLong || size == kDouble) {
- data_offset = Array::DataOffset(sizeof(int64_t)).Int32Value();
+ data_offset = mirror::Array::DataOffset(sizeof(int64_t)).Int32Value();
} else {
- data_offset = Array::DataOffset(sizeof(int32_t)).Int32Value();
+ data_offset = mirror::Array::DataOffset(sizeof(int32_t)).Int32Value();
}
rl_array = LoadValue(cu, rl_array, kCoreReg);
@@ -537,8 +537,8 @@
void X86Codegen::GenArrayObjPut(CompilationUnit* cu, int opt_flags, RegLocation rl_array,
RegLocation rl_index, RegLocation rl_src, int scale)
{
- int len_offset = Array::LengthOffset().Int32Value();
- int data_offset = Array::DataOffset(sizeof(Object*)).Int32Value();
+ int len_offset = mirror::Array::LengthOffset().Int32Value();
+ int data_offset = mirror::Array::DataOffset(sizeof(mirror::Object*)).Int32Value();
FlushAllRegs(cu); // Use explicit registers
LockCallTemps(cu);
@@ -558,7 +558,7 @@
LIR* null_value_check = OpCmpImmBranch(cu, kCondEq, r_value, 0, NULL);
// Get the array's class.
- LoadWordDisp(cu, r_array, Object::ClassOffset().Int32Value(), r_array_class);
+ LoadWordDisp(cu, r_array, mirror::Object::ClassOffset().Int32Value(), r_array_class);
CallRuntimeHelperRegReg(cu, ENTRYPOINT_OFFSET(pCanPutArrayElementFromCode), r_value,
r_array_class, true);
// Redo LoadValues in case they didn't survive the call.