static SpecializationNode insertSorted(SpecializationNode start, final SpecializationNode generated, final CharSequence message, final SpecializationNode merged) { if (merged == generated) { // new node if (start.count() == 2) { SpecializationNode polymorphic = start.createPolymorphic(); /* * For nodes with all parameters evaluated in the execute method we do not need a * polymorphic node. the generated code returns null in createPolymorphic in this * case. */ if (polymorphic != null) { insertAt(start, polymorphic, "insert polymorphic"); } } SpecializationNode current = start; while (current != null && current.index < generated.index) { current = current.next; } return insertAt(current, generated, message); } else { // existing node return start; } }
public SpecializationNode call() throws Exception { SpecializationNode next = source.createNext(frame, o1, o2, o3); if (next == null) { next = source.createFallback(); } if (next == null) { return null; } SpecializationNode start = source.findStart(); if (start.index == Integer.MAX_VALUE) { return insertAt(start, next, this); } else { return insertSorted(start, next, this, start.merge(next, frame, o1, o2, o3)); } }
public SpecializationNode call() throws Exception { SpecializationNode next = source.createNext(frame); if (next == null) { next = source.createFallback(); } if (next == null) { return null; } SpecializationNode start = source.findStart(); if (start.index == Integer.MAX_VALUE) { return insertAt(start, next, this); } else { return insertSorted(start, next, this, start.merge(next, frame)); } }
public SpecializationNode call() throws Exception { SpecializationNode next = source.createNext(frame, o1); if (next == null) { next = source.createFallback(); } if (next == null) { return null; } SpecializationNode start = source.findStart(); if (start.index == Integer.MAX_VALUE) { return insertAt(start, next, this); } else { return insertSorted(start, next, this, start.merge(next, frame, o1)); } }
public SpecializationNode call() throws Exception { SpecializationNode next = source.createNext(frame, o1, o2, o3, o4, o5); if (next == null) { next = source.createFallback(); } if (next == null) { return null; } SpecializationNode start = source.findStart(); if (start.index == Integer.MAX_VALUE) { return insertAt(start, next, this); } else { return insertSorted(start, next, this, start.merge(next, frame, o1, o2, o3, o4, o5)); } }
public SpecializationNode call() throws Exception { SpecializationNode next = source.createNext(frame, o1, o2); if (next == null) { next = source.createFallback(); } if (next == null) { return null; } SpecializationNode start = source.findStart(); if (start.index == Integer.MAX_VALUE) { return insertAt(start, next, this); } else { return insertSorted(start, next, this, start.merge(next, frame, o1, o2)); } }
public SpecializationNode call() throws Exception { SpecializationNode next = source.createNext(frame, o1, o2, o3, o4); if (next == null) { next = source.createFallback(); } if (next == null) { return null; } SpecializationNode start = source.findStart(); if (start.index == Integer.MAX_VALUE) { return insertAt(start, next, this); } else { return insertSorted(start, next, this, start.merge(next, frame, o1, o2, o3, o4)); } }
public SpecializationNode call() throws Exception { SpecializationNode next = source.createNext(frame, args); if (next == null) { next = source.createFallback(); } if (next == null) { return null; } SpecializationNode start = source.findStart(); if (start.index == Integer.MAX_VALUE) { return insertAt(start, next, this); } else { return insertSorted(start, next, this, start.merge(next, frame, args)); } } }