From 222862ceaeed48528020412ef4f7b1cdaecf8789 Mon Sep 17 00:00:00 2001 From: Guillaume Sanchez Date: Tue, 9 Jun 2015 18:33:02 +0100 Subject: Add optimizations for instanceof/checkcast. The optimizations try to statically determine the outcome of the type tests, replacing/removing the instructions when possible. This required to fix the is_exact flag for ReferenceTypePropagation. Change-Id: I6cea29b6c351d118b62060e8420333085e9383fb --- compiler/optimizing/nodes.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler/optimizing/nodes.h') diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index f87775e195..c5fc5637a0 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -1281,6 +1281,9 @@ class ReferenceTypeInfo : ValueObject { bool IsExact() const { return is_exact_; } bool IsTop() const { return is_top_; } + bool IsInterface() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { + return !IsTop() && GetTypeHandle()->IsInterface(); + } Handle GetTypeHandle() const { return type_handle_; } -- cgit v1.2.3-59-g8ed1b