diff options
Diffstat (limited to 'jack-tests/tests/com/android/jack/opcodes/iget/jm')
8 files changed, 208 insertions, 0 deletions
diff --git a/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_1.java b/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_1.java new file mode 100644 index 0000000..40d1c92 --- /dev/null +++ b/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_1.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.jack.opcodes.iget.jm; + +public class T_iget_1 { + public int i1 = 5; + protected int p1 = 10; + private int pvt1 = 20; + + public int run(){ + return i1 + p1 + pvt1; + } +} diff --git a/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_11.java b/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_11.java new file mode 100644 index 0000000..49505c5 --- /dev/null +++ b/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_11.java @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.jack.opcodes.iget.jm; + +public class T_iget_11 extends T_iget_1 { + + public int run(){ + return p1; + } +} diff --git a/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_15.java b/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_15.java new file mode 100644 index 0000000..568ad3e --- /dev/null +++ b/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_15.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.jack.opcodes.iget.jm; + +public class T_iget_15 { + + public Object run() { + TChild s = new TChild(); + return s.o; + } +} diff --git a/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_2.java b/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_2.java new file mode 100644 index 0000000..3f353ea --- /dev/null +++ b/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_2.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.jack.opcodes.iget.jm; + +public class T_iget_2 { + + public double val = 123.0d; + + public double run() { + return val; + } +} diff --git a/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_4.java b/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_4.java new file mode 100644 index 0000000..81609ed --- /dev/null +++ b/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_4.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.jack.opcodes.iget.jm; + +public class T_iget_4 { + + public int i1 = 5; + public int run(){ + return i1; + } +} diff --git a/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_5.java b/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_5.java new file mode 100644 index 0000000..7fa65e5 --- /dev/null +++ b/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_5.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.jack.opcodes.iget.jm; + +public class T_iget_5 { + + public static int i1 = 5; + public int run(){ + return i1; + } +} + diff --git a/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_6.java b/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_6.java new file mode 100644 index 0000000..1fafddc --- /dev/null +++ b/jack-tests/tests/com/android/jack/opcodes/iget/jm/T_iget_6.java @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.jack.opcodes.iget.jm; + +public class T_iget_6 { + + public int run() { + return -99; + } +} diff --git a/jack-tests/tests/com/android/jack/opcodes/iget/jm/TestStubs.java b/jack-tests/tests/com/android/jack/opcodes/iget/jm/TestStubs.java new file mode 100644 index 0000000..bb7b96c --- /dev/null +++ b/jack-tests/tests/com/android/jack/opcodes/iget/jm/TestStubs.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2008 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. + */ + +package com.android.jack.opcodes.iget.jm; + + + +class TSuper { + public String s = "abc"; +} + +class TChild extends TSuper { + public Object o = null; +} + +public class TestStubs { + private int privateInt = 456; +} |