Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/TruffleOptions.java @ 14564:5d1308c78ddc
Truffle: Introduced NodeCost as a replacement for NodeInfo.Kind.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 17 Mar 2014 14:29:45 +0100 |
parents | c35d86f53ace |
children | 76895499bc88 |
comparison
equal
deleted
inserted
replaced
14108:98d38009bb2b | 14564:5d1308c78ddc |
---|---|
23 * questions. | 23 * questions. |
24 */ | 24 */ |
25 package com.oracle.truffle.api; | 25 package com.oracle.truffle.api; |
26 | 26 |
27 import com.oracle.truffle.api.nodes.*; | 27 import com.oracle.truffle.api.nodes.*; |
28 import com.oracle.truffle.api.nodes.NodeInfo.Kind; | |
29 | 28 |
30 /** | 29 /** |
31 * Class containing general Truffle options. | 30 * Class containing general Truffle options. |
32 */ | 31 */ |
33 public class TruffleOptions { | 32 public class TruffleOptions { |
54 * Can be set with {@code -Dtruffle.TraceRewritesFilterClass=name}. | 53 * Can be set with {@code -Dtruffle.TraceRewritesFilterClass=name}. |
55 */ | 54 */ |
56 public static String TraceRewritesFilterClass = System.getProperty("truffle.TraceRewritesFilterClass"); | 55 public static String TraceRewritesFilterClass = System.getProperty("truffle.TraceRewritesFilterClass"); |
57 | 56 |
58 /** | 57 /** |
59 * Filters rewrites which does not contain the {@link Kind} in its source {@link NodeInfo}. If | 58 * Filters rewrites which does not contain the {@link NodeCost} in its source {@link NodeInfo}. |
60 * no {@link NodeInfo} is defined the element is filtered if the filter value is set. | 59 * If no {@link NodeInfo} is defined the element is filtered if the filter value is set. |
61 * <p> | 60 * <p> |
62 * Can be set with | 61 * Can be set with |
63 * {@code -Dtruffle.TraceRewritesFilterFromKind=UNINITIALIZED|SPECIALIZED|POLYMORPHIC|GENERIC}. | 62 * {@code -Dtruffle.TraceRewritesFilterFromCost=NONE|MONOMORPHIC|POLYMORPHIC|MEGAMORPHIC}. |
64 */ | 63 */ |
65 public static NodeInfo.Kind TraceRewritesFilterFromKind = parseNodeInfoKind(System.getProperty("truffle.TraceRewritesFilterFromKind")); | 64 public static NodeCost TraceRewritesFilterFromCost = parseNodeInfoKind(System.getProperty("truffle.TraceRewritesFilterFromCost")); |
66 | 65 |
67 /** | 66 /** |
68 * Filters rewrites which does not contain the {@link Kind} in its target {@link NodeInfo}. If | 67 * Filters rewrites which does not contain the {@link NodeCost} in its target {@link NodeInfo}. |
69 * no {@link NodeInfo} is defined the element is filtered if the filter value is set. | 68 * If no {@link NodeInfo} is defined the element is filtered if the filter value is set. |
70 * <p> | 69 * <p> |
71 * Can be set with | 70 * Can be set with |
72 * {@code -Dtruffle.TraceRewritesFilterToKind=UNINITIALIZED|SPECIALIZED|POLYMORPHIC|GENERIC}. | 71 * {@code -Dtruffle.TraceRewritesFilterToKind=UNINITIALIZED|SPECIALIZED|POLYMORPHIC|GENERIC}. |
73 */ | 72 */ |
74 public static NodeInfo.Kind TraceRewritesFilterToKind = parseNodeInfoKind(System.getProperty("truffle.TraceRewritesFilterToKind")); | 73 public static NodeCost TraceRewritesFilterToCost = parseNodeInfoKind(System.getProperty("truffle.TraceRewritesFilterToCost")); |
75 | 74 |
76 private static NodeInfo.Kind parseNodeInfoKind(String kind) { | 75 private static NodeCost parseNodeInfoKind(String kind) { |
77 if (kind == null) { | 76 if (kind == null) { |
78 return null; | 77 return null; |
79 } | 78 } |
80 | 79 |
81 return NodeInfo.Kind.valueOf(kind); | 80 return NodeCost.valueOf(kind); |
82 } | 81 } |
83 | 82 |
84 } | 83 } |