Mercurial > hg > truffle
changeset 5324:414c439ddec9
documented the reason for the NodeClassSnippets being written
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 30 Apr 2012 14:13:47 +0200 |
parents | bb6c9818cd03 |
children | f8ea2735ec4f |
files | graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/NodeClassSnippets.java |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/NodeClassSnippets.java Mon Apr 30 13:52:45 2012 +0200 +++ b/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/NodeClassSnippets.java Mon Apr 30 14:13:47 2012 +0200 @@ -27,13 +27,16 @@ import com.oracle.graal.nodes.extended.*; /** - * Snippets for {@link NodeClass} methods. + * Snippets for improving the performance of some critical methods in {@link NodeClass} methods. + * These snippets improve the performance by forcing the relevant methods to be inlined + * (intrinsification being a special form of inlining) and removing a checked cast. + * The latter cannot be done directly in Java code as {@link UnsafeCastNode} + * is not available to the project containing {@link NodeClass}. */ @SuppressWarnings("unused") @ClassSubstitution(NodeClass.class) public class NodeClassSnippets implements SnippetsInterface { - private static Node getNode(Node node, long offset) { return UnsafeCastNode.cast(UnsafeLoadNode.load(node, 0, offset, CiKind.Object), Node.class); }