Mercurial > hg > truffle
annotate graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/reflect/Array_set03.java @ 18148:aed00dc20923
Pass FrameMap to Backend.newCompilationResultBuilder().
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Tue, 21 Oct 2014 15:29:41 +0200 |
parents | 64dcb92ee75a |
children |
rev | line source |
---|---|
4587
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
1 /* |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
2 * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
4 * |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
8 * |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
13 * accompanied this code). |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
14 * |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
18 * |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
21 * questions. |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
22 */ |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
23 /* |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
24 */ |
5060
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
25 package com.oracle.graal.jtt.reflect; |
4587
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
26 |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
27 import java.lang.reflect.*; |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
28 |
14991
64dcb92ee75a
Truffle: Change signature for Truffle calls from (PackedFrame, Arguments) to (Object[]).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7282
diff
changeset
|
29 import org.junit.*; |
64dcb92ee75a
Truffle: Change signature for Truffle calls from (PackedFrame, Arguments) to (Object[]).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7282
diff
changeset
|
30 |
7282
390448a6b535
converted the JTT tests to use the GraalCompilerTest framework which offers more control over what is compiled and executed
Doug Simon <doug.simon@oracle.com>
parents:
5061
diff
changeset
|
31 import com.oracle.graal.jtt.*; |
4587
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
32 |
7282
390448a6b535
converted the JTT tests to use the GraalCompilerTest framework which offers more control over what is compiled and executed
Doug Simon <doug.simon@oracle.com>
parents:
5061
diff
changeset
|
33 public class Array_set03 extends JTTTest { |
4587
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
34 |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
35 private static final byte[] array = {-1, -1, -1}; |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
36 |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
37 public static byte test(int i, byte value) { |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
38 Array.set(array, i, value); |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
39 return array[i]; |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
40 } |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
41 |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
42 @Test |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
43 public void run0() throws Throwable { |
7282
390448a6b535
converted the JTT tests to use the GraalCompilerTest framework which offers more control over what is compiled and executed
Doug Simon <doug.simon@oracle.com>
parents:
5061
diff
changeset
|
44 runTest("test", 0, ((byte) 11)); |
4587
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
45 } |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
46 |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
47 @Test |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
48 public void run1() throws Throwable { |
7282
390448a6b535
converted the JTT tests to use the GraalCompilerTest framework which offers more control over what is compiled and executed
Doug Simon <doug.simon@oracle.com>
parents:
5061
diff
changeset
|
49 runTest("test", 1, ((byte) 21)); |
4587
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
50 } |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
51 |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
52 @Test |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
53 public void run2() throws Throwable { |
7282
390448a6b535
converted the JTT tests to use the GraalCompilerTest framework which offers more control over what is compiled and executed
Doug Simon <doug.simon@oracle.com>
parents:
5061
diff
changeset
|
54 runTest("test", 0, ((byte) 42)); |
4587
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
55 } |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
56 |
7282
390448a6b535
converted the JTT tests to use the GraalCompilerTest framework which offers more control over what is compiled and executed
Doug Simon <doug.simon@oracle.com>
parents:
5061
diff
changeset
|
57 @Test |
4587
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
58 public void run3() throws Throwable { |
7282
390448a6b535
converted the JTT tests to use the GraalCompilerTest framework which offers more control over what is compiled and executed
Doug Simon <doug.simon@oracle.com>
parents:
5061
diff
changeset
|
59 runTest("test", 3, ((byte) 0)); |
4587
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
60 } |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
61 |
5b04b33dac74
add jtt tests, converted from the maxine repository using ConvertJTT
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
62 } |