annotate graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/CompileTheWorldTest.java @ 18408:2c3666f44855

Truffle: initial commit of object API implementation
author Andreas Woess <andreas.woess@jku.at>
date Tue, 18 Nov 2014 23:19:43 +0100
parents d90e5c22ba55
children 3cbb0846337c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9108
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
1 /*
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
4 *
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
7 * published by the Free Software Foundation.
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
8 *
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
13 * accompanied this code).
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
14 *
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
18 *
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
21 * questions.
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
22 */
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
23 package com.oracle.graal.hotspot.test;
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
24
15259
d90e5c22ba55 Move GraalOptions to graal.compiler.common.
Josef Eisl <josef.eisl@jku.at>
parents: 13365
diff changeset
25 import static com.oracle.graal.compiler.common.GraalOptions.*;
9966
4158612eca60 GraalOptions: use static import
Bernhard Urban <bernhard.urban@jku.at>
parents: 9911
diff changeset
26
9108
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
27 import org.junit.*;
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
28
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
29 import com.oracle.graal.compiler.test.*;
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
30 import com.oracle.graal.hotspot.*;
13365
bfc5acea3c12 consolidated mechanism for overriding options in CompileTheWorld
Doug Simon <doug.simon@oracle.com>
parents: 13353
diff changeset
31 import com.oracle.graal.hotspot.CompileTheWorld.Config;
9108
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
32
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
33 /**
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
34 * Tests {@link CompileTheWorld} functionality.
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
35 */
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
36 public class CompileTheWorldTest extends GraalCompilerTest {
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
37
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
38 @Test
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
39 public void testRtJar() throws Throwable {
9966
4158612eca60 GraalOptions: use static import
Bernhard Urban <bernhard.urban@jku.at>
parents: 9911
diff changeset
40 boolean originalSetting = ExitVMOnException.getValue();
9108
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
41 // Compile a couple classes in rt.jar
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
42 String file = System.getProperty("java.home") + "/lib/rt.jar";
13365
bfc5acea3c12 consolidated mechanism for overriding options in CompileTheWorld
Doug Simon <doug.simon@oracle.com>
parents: 13353
diff changeset
43 new CompileTheWorld(file, new Config(null), 1, 5, false).compile();
9966
4158612eca60 GraalOptions: use static import
Bernhard Urban <bernhard.urban@jku.at>
parents: 9911
diff changeset
44 ExitVMOnException.setValue(originalSetting);
9108
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
45 }
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
46
b78686983a75 GRAAL-218: add CompileTheWorld functionality
twisti
parents:
diff changeset
47 }