Small optimization for recursive calls: avoid dex cache.
Change-Id: I044757a2f06e535cdc1480c4fc8182b89635baf6
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 2cc021c..1a0ebe5 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -1711,9 +1711,11 @@
Primitive::Type return_type,
uint32_t dex_pc,
uint32_t dex_method_index,
+ bool is_recursive,
InvokeType invoke_type)
: HInvoke(arena, number_of_arguments, return_type, dex_pc, dex_method_index),
- invoke_type_(invoke_type) {}
+ invoke_type_(invoke_type),
+ is_recursive_(is_recursive) {}
bool CanDoImplicitNullCheck() const OVERRIDE {
// We access the method via the dex cache so we can't do an implicit null check.
@@ -1722,11 +1724,13 @@
}
InvokeType GetInvokeType() const { return invoke_type_; }
+ bool IsRecursive() const { return is_recursive_; }
DECLARE_INSTRUCTION(InvokeStaticOrDirect);
private:
const InvokeType invoke_type_;
+ const bool is_recursive_;
DISALLOW_COPY_AND_ASSIGN(HInvokeStaticOrDirect);
};