public Node setIterNode(Node iterNode) { this.iterNode = iterNode; // refresh call adapter, since it matters if this is iter-based or not callAdapter = MethodIndex.getCallSite(callAdapter.methodName); return this; }
public static CallSite[] setCallSite(CallSite[] callSites, int index, String name) { callSites[index] = MethodIndex.getCallSite(name); return callSites; }
public Node setIterNode(Node iterNode) { this.iterNode = iterNode; // refresh call adapter, since it matters if this is iter-based or not callAdapter = MethodIndex.getCallSite(callAdapter.methodName); return this; }
public static CallSite[] setCallSite(CallSite[] callSites, int index, String name) { callSites[index] = MethodIndex.getCallSite(name); return callSites; }
public static CallSite[] setCallSite(CallSite[] callSites, int index, String name) { callSites[index] = MethodIndex.getCallSite(name); return callSites; }
public static CallSite[] setCallSite(CallSite[] callSites, int index, String name) { callSites[index] = MethodIndex.getCallSite(name); return callSites; }
public OpAsgnNode(ISourcePosition position, Node receiverNode, Node valueNode, String variableName, String operatorName) { super(position); assert receiverNode != null : "receiverNode is not null"; assert valueNode != null : "valueNode is not null"; this.receiverNode = receiverNode; this.valueNode = valueNode; this.variableCallAdapter = MethodIndex.getCallSite(variableName); this.operatorCallAdapter = MethodIndex.getCallSite(operatorName); this.variableAsgnCallAdapter = MethodIndex.getCallSite((variableName + "=").intern()); }
public OpAsgnNode(ISourcePosition position, Node receiverNode, Node valueNode, String variableName, String operatorName) { super(position); assert receiverNode != null : "receiverNode is not null"; assert valueNode != null : "valueNode is not null"; this.receiverNode = receiverNode; this.valueNode = valueNode; this.variableCallAdapter = MethodIndex.getCallSite(variableName); this.operatorCallAdapter = MethodIndex.getCallSite(operatorName); this.variableAsgnCallAdapter = MethodIndex.getCallSite((variableName + "=").intern()); }
public CallNode(ISourcePosition position, Node receiverNode, String name, Node argsNode, Node iterNode) { super(position); assert receiverNode != null : "receiverNode is not null"; this.receiverNode = receiverNode; setArgsNode(argsNode); this.iterNode = iterNode; this.callAdapter = MethodIndex.getCallSite(name); }
public CallNode(ISourcePosition position, Node receiverNode, String name, Node argsNode, Node iterNode) { super(position); assert receiverNode != null : "receiverNode is not null"; this.receiverNode = receiverNode; setArgsNode(argsNode); this.iterNode = iterNode; this.callAdapter = MethodIndex.getCallSite(name); }
public AttrAssignNode(ISourcePosition position, Node receiverNode, String name, Node argsNode) { super(position); assert receiverNode != null : "receiverNode is not null"; // TODO: At least ParserSupport.attrset passes argsNode as null. ImplicitNil is wrong magic for // setupArgs since it will IRubyObject[] { nil }. So we need to figure out a nice fast // null pattern for setupArgs. // assert argsNode != null : "receiverNode is not null"; this.receiverNode = receiverNode; this.name = name; setArgsInternal(argsNode); this.callAdapter = receiverNode instanceof SelfNode ? MethodIndex.getFunctionalCallSite(name) : MethodIndex.getCallSite(name); }
public AttrAssignNode(ISourcePosition position, Node receiverNode, String name, Node argsNode) { super(position); assert receiverNode != null : "receiverNode is not null"; // TODO: At least ParserSupport.attrset passes argsNode as null. ImplicitNil is wrong magic for // setupArgs since it will IRubyObject[] { nil }. So we need to figure out a nice fast // null pattern for setupArgs. // assert argsNode != null : "receiverNode is not null"; this.receiverNode = receiverNode; this.name = name; setArgsInternal(argsNode); this.callAdapter = receiverNode instanceof SelfNode ? MethodIndex.getFunctionalCallSite(name) : MethodIndex.getCallSite(name); }
public CallOneArgFixnumNode(ISourcePosition position, Node receiverNode, String name, ArrayNode args) { super(position, receiverNode, name, args, null); assert args.size() == 1 : "args.size() is 1"; arg1 = ((FixnumNode) args.get(0)).getValue(); callAdapter = MethodIndex.getCallSite(name); }
public CallOneArgFixnumNode(ISourcePosition position, Node receiverNode, String name, ArrayNode args) { super(position, receiverNode, name, args, null); assert args.size() == 1 : "args.size() is 1"; arg1 = ((FixnumNode) args.get(0)).getValue(); callAdapter = MethodIndex.getCallSite(name); }
public OpElementAsgnNode(ISourcePosition position, Node receiverNode, String operatorName, Node argsNode, Node valueNode) { super(position); assert receiverNode != null : "receiverNode is not null"; assert valueNode != null : "valueNode is not null"; this.receiverNode = receiverNode; this.argsNode = argsNode; if (argsNode instanceof ArrayNode) { ((ArrayNode)argsNode).setLightweight(true); } this.valueNode = valueNode; callAdapter = MethodIndex.getCallSite(operatorName); elementAdapter = MethodIndex.getFunctionalCallSite("[]"); elementAsgnAdapter = MethodIndex.getFunctionalCallSite("[]="); }
public OpElementAsgnNode(ISourcePosition position, Node receiverNode, String operatorName, Node argsNode, Node valueNode) { super(position); assert receiverNode != null : "receiverNode is not null"; assert valueNode != null : "valueNode is not null"; this.receiverNode = receiverNode; this.argsNode = argsNode; if (argsNode instanceof ArrayNode) { ((ArrayNode)argsNode).setLightweight(true); } this.valueNode = valueNode; callAdapter = MethodIndex.getCallSite(operatorName); elementAdapter = MethodIndex.getFunctionalCallSite("[]"); elementAsgnAdapter = MethodIndex.getFunctionalCallSite("[]="); }
private static CallSite getCallSiteFor(CallType callType, MethAddr methAddr) { assert callType != null: "Calltype should never be null"; String name = methAddr.getName(); switch (callType) { case NORMAL: return MethodIndex.getCallSite(name); case FUNCTIONAL: return MethodIndex.getFunctionalCallSite(name); case VARIABLE: return MethodIndex.getVariableCallSite(name); case SUPER: return MethodIndex.getSuperCallSite(); case UNKNOWN: } return null; // fallthrough for unknown }
private static CallSite getCallSiteFor(CallType callType, MethAddr methAddr) { assert callType != null: "Calltype should never be null"; String name = methAddr.getName(); switch (callType) { case NORMAL: return MethodIndex.getCallSite(name); case FUNCTIONAL: return MethodIndex.getFunctionalCallSite(name); case VARIABLE: return MethodIndex.getVariableCallSite(name); case SUPER: return MethodIndex.getSuperCallSite(); case UNKNOWN: } return null; // fallthrough for unknown }
protected static CallSite getCallSiteFor(IRScope scope, CallType callType, String name, long callsiteId, boolean hasLiteralClosure, boolean potentiallyRefined) { assert callType != null: "Calltype should never be null"; if (potentiallyRefined) return new RefinedCachingCallSite(name, callType); switch (callType) { case NORMAL: if (IRManager.IR_INLINER && hasLiteralClosure) { return MethodIndex.getProfilingCallSite(name, scope, callsiteId); } else { return MethodIndex.getCallSite(name); } case FUNCTIONAL: return MethodIndex.getFunctionalCallSite(name); case VARIABLE: return MethodIndex.getVariableCallSite(name); case SUPER: return MethodIndex.getSuperCallSite(); case UNKNOWN: } return null; // fallthrough for unknown }
protected static CallSite getCallSiteFor(IRScope scope, CallType callType, String name, long callsiteId, boolean hasLiteralClosure, boolean potentiallyRefined) { assert callType != null: "Calltype should never be null"; if (potentiallyRefined) return new RefinedCachingCallSite(name, callType); switch (callType) { case NORMAL: if (IRManager.IR_INLINER && hasLiteralClosure) { return MethodIndex.getProfilingCallSite(name, scope, callsiteId); } else { return MethodIndex.getCallSite(name); } case FUNCTIONAL: return MethodIndex.getFunctionalCallSite(name); case VARIABLE: return MethodIndex.getVariableCallSite(name); case SUPER: return MethodIndex.getSuperCallSite(); case UNKNOWN: } return null; // fallthrough for unknown }