com.oracle.truffle.api.nodes.Node.dump()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(637)

本文整理了Java中com.oracle.truffle.api.nodes.Node.dump()方法的一些代码示例,展示了Node.dump()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.dump()方法的具体详情如下:
包路径:com.oracle.truffle.api.nodes.Node
类名称:Node
方法名:dump

Node.dump介绍

暂无

代码示例

代码示例来源:origin: com.oracle.truffle/truffle-api

  1. final void adoptHelper(final Node newChild) {
  2. assert newChild != null;
  3. if (newChild == this) {
  4. throw new IllegalStateException("The parent of a node can never be the node itself.");
  5. }
  6. assert checkSameLanguages(newChild);
  7. newChild.parent = this;
  8. if (TruffleOptions.TraceASTJSON) {
  9. dump(this, newChild, null);
  10. }
  11. NodeUtil.adoptChildrenHelper(newChild);
  12. }

代码示例来源:origin: com.oracle.truffle/truffle-api

  1. int adoptAndCountHelper(Node newChild) {
  2. assert newChild != null;
  3. if (newChild == this) {
  4. throw new IllegalStateException("The parent of a node can never be the node itself.");
  5. }
  6. assert checkSameLanguages(newChild);
  7. newChild.parent = this;
  8. if (TruffleOptions.TraceASTJSON) {
  9. dump(this, newChild, null);
  10. }
  11. return 1 + NodeUtil.adoptChildrenAndCountHelper(newChild);
  12. }

代码示例来源:origin: org.graalvm.truffle/truffle-api

  1. /** @since 0.8 or earlier */
  2. @SuppressWarnings("deprecation")
  3. protected Node() {
  4. CompilerAsserts.neverPartOfCompilation("do not create a Node from compiled code");
  5. assert NodeClass.get(getClass()) != null; // ensure NodeClass constructor does not throw
  6. if (TruffleOptions.TraceASTJSON) {
  7. dump(this, null, null);
  8. }
  9. }

代码示例来源:origin: com.oracle.truffle/truffle-api

  1. /** @since 0.8 or earlier */
  2. protected Node() {
  3. CompilerAsserts.neverPartOfCompilation("do not create a Node from compiled code");
  4. assert NodeClass.get(getClass()) != null; // ensure NodeClass constructor does not throw
  5. if (TruffleOptions.TraceASTJSON) {
  6. dump(this, null, null);
  7. }
  8. }

代码示例来源:origin: org.graalvm.truffle/truffle-api

  1. @SuppressWarnings("deprecation")
  2. final void adoptHelper(final Node newChild) {
  3. assert newChild != null;
  4. if (newChild == this) {
  5. throw new IllegalStateException("The parent of a node can never be the node itself.");
  6. }
  7. assert checkSameLanguages(newChild);
  8. newChild.parent = this;
  9. if (TruffleOptions.TraceASTJSON) {
  10. dump(this, newChild, null);
  11. }
  12. NodeUtil.adoptChildrenHelper(newChild);
  13. }

代码示例来源:origin: org.graalvm.truffle/truffle-api

  1. @SuppressWarnings("deprecation")
  2. int adoptAndCountHelper(Node newChild) {
  3. assert newChild != null;
  4. if (newChild == this) {
  5. throw new IllegalStateException("The parent of a node can never be the node itself.");
  6. }
  7. assert checkSameLanguages(newChild);
  8. newChild.parent = this;
  9. if (TruffleOptions.TraceASTJSON) {
  10. dump(this, newChild, null);
  11. }
  12. return 1 + NodeUtil.adoptChildrenAndCountHelper(newChild);
  13. }

代码示例来源:origin: com.oracle.truffle/truffle-api

  1. private void reportReplace(Node oldNode, Node newNode, CharSequence reason) {
  2. Node node = this;
  3. while (node != null) {
  4. boolean consumed = false;
  5. if (node instanceof ReplaceObserver) {
  6. consumed = ((ReplaceObserver) node).nodeReplaced(oldNode, newNode, reason);
  7. } else if (node instanceof RootNode) {
  8. CallTarget target = ((RootNode) node).getCallTarget();
  9. if (target instanceof ReplaceObserver) {
  10. consumed = ((ReplaceObserver) target).nodeReplaced(oldNode, newNode, reason);
  11. }
  12. }
  13. if (consumed) {
  14. break;
  15. }
  16. node = node.getParent();
  17. }
  18. if (TruffleOptions.TraceRewrites) {
  19. NodeUtil.traceRewrite(this, newNode, reason);
  20. }
  21. if (TruffleOptions.TraceASTJSON) {
  22. dump(this, newNode, reason);
  23. }
  24. }

代码示例来源:origin: org.graalvm.truffle/truffle-api

  1. @SuppressWarnings("deprecation")
  2. private void reportReplace(Node oldNode, Node newNode, CharSequence reason) {
  3. Node node = this;
  4. while (node != null) {
  5. boolean consumed = false;
  6. if (node instanceof ReplaceObserver) {
  7. consumed = ((ReplaceObserver) node).nodeReplaced(oldNode, newNode, reason);
  8. } else if (node instanceof RootNode) {
  9. CallTarget target = ((RootNode) node).getCallTarget();
  10. if (target instanceof ReplaceObserver) {
  11. consumed = ((ReplaceObserver) target).nodeReplaced(oldNode, newNode, reason);
  12. }
  13. }
  14. if (consumed) {
  15. break;
  16. }
  17. node = node.getParent();
  18. }
  19. if (TruffleOptions.TraceRewrites) {
  20. NodeUtil.traceRewrite(this, newNode, reason);
  21. }
  22. if (TruffleOptions.TraceASTJSON) {
  23. dump(this, newNode, reason);
  24. }
  25. }

相关文章