annotate graal/com.oracle.truffle.api/src/com/oracle/truffle/api/TruffleOptions.java @ 11279:494b818b527c

Adding "Classpath" exception to the classes in the com.oracle.truffle.api and the com.oracle.truffle.api.dsl package.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Fri, 09 Aug 2013 11:55:20 +0200
parents a0309f88306c
children 29a6cb0783de
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10590
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
1 /*
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
2 * Copyright (c) 2012, 2012, Oracle and/or its affiliates. All rights reserved.
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
4 *
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
11279
494b818b527c Adding "Classpath" exception to the classes in the com.oracle.truffle.api and the com.oracle.truffle.api.dsl package.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10690
diff changeset
7 * published by the Free Software Foundation. Oracle designates this
494b818b527c Adding "Classpath" exception to the classes in the com.oracle.truffle.api and the com.oracle.truffle.api.dsl package.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10690
diff changeset
8 * particular file as subject to the "Classpath" exception as provided
494b818b527c Adding "Classpath" exception to the classes in the com.oracle.truffle.api and the com.oracle.truffle.api.dsl package.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10690
diff changeset
9 * by Oracle in the LICENSE file that accompanied this code.
10590
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
10 *
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
11 * This code is distributed in the hope that it will be useful, but WITHOUT
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
14 * version 2 for more details (a copy is included in the LICENSE file that
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
15 * accompanied this code).
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
16 *
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License version
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
18 * 2 along with this work; if not, write to the Free Software Foundation,
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
20 *
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
22 * or visit www.oracle.com if you need additional information or have any
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
23 * questions.
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
24 */
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
25 package com.oracle.truffle.api;
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
26
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
27 import com.oracle.truffle.api.nodes.*;
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
28 import com.oracle.truffle.api.nodes.NodeInfo.Kind;
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
29
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
30 /**
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
31 * Class containing general Truffle options.
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
32 */
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
33 public class TruffleOptions {
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
34
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
35 /** Enables/disables the rewriting of traces in the truffle runtime to stdout. */
10676
9db1377b0580 Fix for TruffleCache.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10599
diff changeset
36 public static boolean TraceRewrites = false;
10590
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
37
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
38 /**
10690
a0309f88306c Added truffle option to enable detailed rewrite messages. Disabled by default.
Christian Humer <christian.humer@gmail.com>
parents: 10676
diff changeset
39 * Enables the generation of detailed rewrite reasons. Enabling this may introduce some overhead
a0309f88306c Added truffle option to enable detailed rewrite messages. Disabled by default.
Christian Humer <christian.humer@gmail.com>
parents: 10676
diff changeset
40 * for rewriting nodes.
a0309f88306c Added truffle option to enable detailed rewrite messages. Disabled by default.
Christian Humer <christian.humer@gmail.com>
parents: 10676
diff changeset
41 */
a0309f88306c Added truffle option to enable detailed rewrite messages. Disabled by default.
Christian Humer <christian.humer@gmail.com>
parents: 10676
diff changeset
42 public static final boolean DetailedRewriteReasons = false;
a0309f88306c Added truffle option to enable detailed rewrite messages. Disabled by default.
Christian Humer <christian.humer@gmail.com>
parents: 10676
diff changeset
43
a0309f88306c Added truffle option to enable detailed rewrite messages. Disabled by default.
Christian Humer <christian.humer@gmail.com>
parents: 10676
diff changeset
44 /**
10590
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
45 * Filters rewrites that do not contain the given string in the qualified name of the source or
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
46 * target class hierarchy.
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
47 */
10676
9db1377b0580 Fix for TruffleCache.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10599
diff changeset
48 public static String TraceRewritesFilterClass = null;
10590
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
49
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
50 /**
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
51 * Filters rewrites which does not contain the {@link Kind} in its source {@link NodeInfo}. If
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
52 * no {@link NodeInfo} is defined the element is filtered if the filter value is set.
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
53 */
10676
9db1377b0580 Fix for TruffleCache.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10599
diff changeset
54 public static NodeInfo.Kind TraceRewritesFilterFromKind = null;
10590
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
55
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
56 /**
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
57 * Filters rewrites which does not contain the {@link Kind} in its target {@link NodeInfo}. If
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
58 * no {@link NodeInfo} is defined the element is filtered if the filter value is set.
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
59 */
10676
9db1377b0580 Fix for TruffleCache.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10599
diff changeset
60 public static NodeInfo.Kind TraceRewritesFilterToKind = null;
10590
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
61
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
62 }