From 0c365e674545159fd77b998081207f0685a605e5 Mon Sep 17 00:00:00 2001 From: Mingyao Yang Date: Tue, 31 Mar 2015 15:09:29 -0700 Subject: CanThrow() of HNewArray should return true. Change-Id: I9950f1c391dfeb26cf59cee769705d01d8e283d5 --- 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 21ed3504f1..da1468ecdb 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -2307,6 +2307,9 @@ class HNewArray : public HExpression<1> { // Calls runtime so needs an environment. bool NeedsEnvironment() const OVERRIDE { return true; } + // May throw NegativeArraySizeException, OutOfMemoryError, etc. + bool CanThrow() const OVERRIDE { return true; } + bool CanBeNull() const OVERRIDE { return false; } QuickEntrypointEnum GetEntrypoint() const { return entrypoint_; } -- cgit v1.2.3-59-g8ed1b