annotate graal/com.oracle.truffle.api/src/com/oracle/truffle/api/TruffleOptions.java @ 10690:a0309f88306c

Added truffle option to enable detailed rewrite messages. Disabled by default.
author Christian Humer <christian.humer@gmail.com>
date Wed, 10 Jul 2013 09:42:22 +0200
parents 9db1377b0580
children 494b818b527c
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
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
8 *
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
9 * 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
10 * 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
11 * 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
12 * 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
13 * accompanied this code).
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
14 *
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
15 * 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
16 * 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
17 * 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
18 *
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
19 * 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
20 * 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
21 * questions.
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
22 */
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
23 package com.oracle.truffle.api;
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 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
26 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
27
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
28 /**
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
29 * Class containing general Truffle options.
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 public class TruffleOptions {
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 /** 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
34 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
35
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
36 /**
10690
a0309f88306c Added truffle option to enable detailed rewrite messages. Disabled by default.
Christian Humer <christian.humer@gmail.com>
parents: 10676
diff changeset
37 * 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
38 * 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
39 */
a0309f88306c Added truffle option to enable detailed rewrite messages. Disabled by default.
Christian Humer <christian.humer@gmail.com>
parents: 10676
diff changeset
40 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
41
a0309f88306c Added truffle option to enable detailed rewrite messages. Disabled by default.
Christian Humer <christian.humer@gmail.com>
parents: 10676
diff changeset
42 /**
10590
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
43 * 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
44 * target class hierarchy.
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
45 */
10676
9db1377b0580 Fix for TruffleCache.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10599
diff changeset
46 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
47
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
48 /**
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
49 * 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
50 * 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
51 */
10676
9db1377b0580 Fix for TruffleCache.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10599
diff changeset
52 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
53
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
54 /**
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
55 * 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
56 * 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
57 */
10676
9db1377b0580 Fix for TruffleCache.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 10599
diff changeset
58 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
59
6eb8d63cea34 Added a feature to trace rewrites of truffle nodes.
Christian Humer <christian.humer@gmail.com>
parents:
diff changeset
60 }