summaryrefslogtreecommitdiffstats
path: root/runtime/interpreter/interpreter_common.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2013-11-14 17:45:16 -0800
committerMathieu Chartier <mathieuc@google.com>2013-11-20 11:14:11 -0800
commitcbb2d20bea2861f244da2e2318d8c088300a3710 (patch)
tree9735d496716cf165ea0ee2d7e2f62d723ffc7734 /runtime/interpreter/interpreter_common.cc
parentd31fb9718a6180304cd951619dc36be8e090a641 (diff)
downloadart-cbb2d20bea2861f244da2e2318d8c088300a3710.zip
art-cbb2d20bea2861f244da2e2318d8c088300a3710.tar.gz
art-cbb2d20bea2861f244da2e2318d8c088300a3710.tar.bz2
Refactor allocation entrypoints.
Adds support for switching entrypoints during runtime. Enables addition of new allocators with out requiring significant copy paste. Slight speedup on ritzperf probably due to more inlining. TODO: Ensuring that the entire allocation path is inlined so that the switch statement in the allocation code is optimized out. Rosalloc measurements: 4583 4453 4439 4434 4751 After change: 4184 4287 4131 4335 4097 Change-Id: I1352a3cbcdf6dae93921582726324d91312df5c9
Diffstat (limited to 'runtime/interpreter/interpreter_common.cc')
-rw-r--r--runtime/interpreter/interpreter_common.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/interpreter/interpreter_common.cc b/runtime/interpreter/interpreter_common.cc
index 08221b7..c9756ac 100644
--- a/runtime/interpreter/interpreter_common.cc
+++ b/runtime/interpreter/interpreter_common.cc
@@ -193,7 +193,7 @@ bool DoFilledNewArray(const Instruction* inst, const ShadowFrame& shadow_frame,
}
return false;
}
- Object* newArray = Array::Alloc<kMovingCollector, true>(self, arrayClass, length);
+ Object* newArray = Array::Alloc<true>(self, arrayClass, length);
if (UNLIKELY(newArray == NULL)) {
DCHECK(self->IsExceptionPending());
return false;
@@ -279,7 +279,7 @@ static void UnstartedRuntimeInvoke(Thread* self, MethodHelper& mh,
// TODO: getDeclaredField calls GetType once the field is found to ensure a
// NoClassDefFoundError is thrown if the field's type cannot be resolved.
Class* jlr_Field = self->DecodeJObject(WellKnownClasses::java_lang_reflect_Field)->AsClass();
- SirtRef<Object> field(self, jlr_Field->AllocObject(self));
+ SirtRef<Object> field(self, jlr_Field->AllocNonMovableObject(self));
CHECK(field.get() != NULL);
ArtMethod* c = jlr_Field->FindDeclaredDirectMethod("<init>", "(Ljava/lang/reflect/ArtField;)V");
uint32_t args[1];