1# Copyright (C) 2015 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15.class public LTestCase; 16.super Ljava/lang/Object; 17 18.method private static $inline$depth1([I)V 19 .registers 3 20 21 # Expects array in v2. 22 23 const v0, 0x0 24 25 const v1, 0x3 26 aput v0, p0, v1 27 28 const v1, 0x4 29 aput v0, p0, v1 30 31 return-void 32.end method 33 34.method private static $inline$depth0([I)V 35 .registers 1 36 37 # Expects array in v0. 38 39 invoke-static {p0}, LTestCase;->$inline$depth1([I)V 40 return-void 41.end method 42 43.method public static foo()V 44 .registers 10 45 46 # Create a new array short enough to throw AIOOB in $inline$depth1. 47 # Make sure the reference is not stored in the same vreg as used by 48 # the inlined methods. 49 50 const v5, 0x3 51 new-array v6, v5, [I 52 53 invoke-static {v6}, LTestCase;->$inline$depth0([I)V 54 return-void 55.end method 56