Codota Logo
Debug$1Visitor.visitShape
Code IndexAdd Codota to your IDE (free)

How to use
visitShape
method
in
com.oracle.truffle.object.Debug$1Visitor

Best Java code snippets using com.oracle.truffle.object.Debug$1Visitor.visitShape (Showing top 2 results out of 1,395)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: com.oracle.truffle/truffle-api

private static String calcShapeGraphSize(ShapeImpl shape) {
  class Visitor implements DebugShapeVisitor<Integer> {
    final Set<Shape> visitedShapes = new HashSet<>();
    int invalidShapeCount;
    int branchCount = 1;
    int leafCount;
    @Override
    public Integer visitShape(ShapeImpl s, Map<? extends Transition, ? extends ShapeImpl> transitions) {
      if (!visitedShapes.add(s)) {
        return 0;
      }
      int shapeCount = 1;
      if (!s.isValid()) {
        invalidShapeCount++;
      }
      if (s.isLeaf()) {
        leafCount++;
      }
      branchCount += Math.max(0, transitions.size() - 1);
      for (Map.Entry<? extends Transition, ? extends ShapeImpl> entry : transitions.entrySet()) {
        shapeCount += this.visitShape(entry.getValue());
      }
      return shapeCount;
    }
  }
  Visitor v = new Visitor();
  int shapeCount = v.visitShape(shape);
  assert shapeCount == v.visitedShapes.size();
  return shapeCount + (v.invalidShapeCount != 0 ? (", " + INVALID + v.invalidShapeCount) : "") + ", " + BRANCH + v.branchCount + ", " + LEAF + v.leafCount;
}
origin: org.graalvm.truffle/truffle-api

private static String calcShapeGraphSize(ShapeImpl shape) {
  class Visitor implements DebugShapeVisitor<Integer> {
    final Set<Shape> visitedShapes = new HashSet<>();
    int invalidShapeCount;
    int branchCount = 1;
    int leafCount;
    @Override
    public Integer visitShape(ShapeImpl s, Map<? extends Transition, ? extends ShapeImpl> transitions) {
      if (!visitedShapes.add(s)) {
        return 0;
      }
      int shapeCount = 1;
      if (!s.isValid()) {
        invalidShapeCount++;
      }
      if (s.isLeaf()) {
        leafCount++;
      }
      branchCount += Math.max(0, transitions.size() - 1);
      for (Map.Entry<? extends Transition, ? extends ShapeImpl> entry : transitions.entrySet()) {
        shapeCount += this.visitShape(entry.getValue());
      }
      return shapeCount;
    }
  }
  Visitor v = new Visitor();
  int shapeCount = v.visitShape(shape);
  assert shapeCount == v.visitedShapes.size();
  return shapeCount + (v.invalidShapeCount != 0 ? (", " + INVALID + v.invalidShapeCount) : "") + ", " + BRANCH + v.branchCount + ", " + LEAF + v.leafCount;
}
com.oracle.truffle.objectDebug$1VisitorvisitShape

Popular methods of Debug$1Visitor

    Popular in Java

    • Start an intent from android
    • getSharedPreferences (Context)
    • setScale (BigDecimal)
      Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
    • setRequestProperty (URLConnection)
      Sets the general request property. If a property with the key already exists, overwrite its value wi
    • FileWriter (java.io)
      Convenience class for writing character files. The constructors of this class assume that the defaul
    • Charset (java.nio.charset)
      A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
    • ResultSet (java.sql)
      An interface for an object which represents a database table entry, returned as the result of the qu
    • List (java.util)
      A List is a collection which maintains an ordering for its elements. Every element in the List has a
    • PriorityQueue (java.util)
      An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
    • Filter (javax.servlet)
      A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now