diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-06-22 11:25:02 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-22 11:25:03 +0000 |
commit | bbcec62c0484fbfb82ee2c317e8afa478a63027b (patch) | |
tree | 1bdf1f27b72b9f8ca73cac20674f68a1eba78897 | |
parent | 39eb41f6ad5af18fb9225e5898f20e348e1a7d75 (diff) | |
parent | be438619f63bcfa954fbc2cd19fd3d62e20fc379 (diff) | |
download | art-bbcec62c0484fbfb82ee2c317e8afa478a63027b.zip art-bbcec62c0484fbfb82ee2c317e8afa478a63027b.tar.gz art-bbcec62c0484fbfb82ee2c317e8afa478a63027b.tar.bz2 |
Merge "Don't check the return type in the builder." into mnc-dev
-rw-r--r-- | compiler/optimizing/builder.cc | 5 | ||||
-rw-r--r-- | test/800-smali/expected.txt | 1 | ||||
-rw-r--r-- | test/800-smali/smali/b_21863767.smali | 29 | ||||
-rw-r--r-- | test/800-smali/src/Main.java | 2 |
4 files changed, 32 insertions, 5 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc index a53c488..eda2a0d 100644 --- a/compiler/optimizing/builder.cc +++ b/compiler/optimizing/builder.cc @@ -1427,21 +1427,16 @@ bool HGraphBuilder::AnalyzeDexInstruction(const Instruction& instruction, uint32 } case Instruction::RETURN: { - DCHECK_NE(return_type_, Primitive::kPrimNot); - DCHECK_NE(return_type_, Primitive::kPrimLong); - DCHECK_NE(return_type_, Primitive::kPrimDouble); BuildReturn(instruction, return_type_); break; } case Instruction::RETURN_OBJECT: { - DCHECK(return_type_ == Primitive::kPrimNot); BuildReturn(instruction, return_type_); break; } case Instruction::RETURN_WIDE: { - DCHECK(return_type_ == Primitive::kPrimDouble || return_type_ == Primitive::kPrimLong); BuildReturn(instruction, return_type_); break; } diff --git a/test/800-smali/expected.txt b/test/800-smali/expected.txt index 284c7ec..f2765e1 100644 --- a/test/800-smali/expected.txt +++ b/test/800-smali/expected.txt @@ -19,4 +19,5 @@ b/20224106 b/21873167 b/21614284 b/21902684 +b/21863767 Done! diff --git a/test/800-smali/smali/b_21863767.smali b/test/800-smali/smali/b_21863767.smali new file mode 100644 index 0000000..9b33bc3 --- /dev/null +++ b/test/800-smali/smali/b_21863767.smali @@ -0,0 +1,29 @@ +# Copyright (C) 2015 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +.class public LB21863767; + +.super Ljava/lang/Object; + +.method public static run()V + .registers 2 + return-void + goto :start + :start + # The following is dead code but used to crash the compiler. + const/4 v0, 0 + return-wide v0 + return v0 + return-object v0 +.end method diff --git a/test/800-smali/src/Main.java b/test/800-smali/src/Main.java index 8d66783..2faee8f 100644 --- a/test/800-smali/src/Main.java +++ b/test/800-smali/src/Main.java @@ -85,6 +85,8 @@ public class Main { testCases.add(new TestCase("b/21614284", "B21614284", "test", new Object[] { null }, new NullPointerException(), null)); testCases.add(new TestCase("b/21902684", "B21902684", "test", null, null, null)); + testCases.add(new TestCase("b/21863767", "B21863767", "run", null, null, + null)); } public void runTests() { |