@Override public Instr cloneForInlining(InlinerInfo ii) { // SSS FIXME: Correct in all situations?? return new RecordEndBlockInstr(declaringScope, endBlockClosure); }
@Override public Instr cloneForInlining(InlinerInfo ii) { // SSS FIXME: Correct in all situations?? return new RecordEndBlockInstr(declaringScope, endBlockClosure); }
@Override public Instr clone(CloneInfo ii) { // SSS FIXME: Correct in all situations?? return new RecordEndBlockInstr(declaringScope, (WrappedIRClosure) getEndBlockClosure().cloneForInlining(ii)); }
@Override public Instr clone(CloneInfo ii) { // SSS FIXME: Correct in all situations?? return new RecordEndBlockInstr(declaringScope, (WrappedIRClosure) getEndBlockClosure().cloneForInlining(ii)); }
public static RecordEndBlockInstr decode(IRReaderDecoder d) { return new RecordEndBlockInstr(d.decodeScope(), (WrappedIRClosure) d.decodeOperand()); }
public static RecordEndBlockInstr decode(IRReaderDecoder d) { return new RecordEndBlockInstr(d.decodeScope(), (WrappedIRClosure) d.decodeOperand()); }
public Operand buildPostExe(PostExeNode postExeNode) { IRScope topLevel = scope.getRootLexicalScope(); IRScope nearestLVarScope = scope.getNearestTopLocalVariableScope(); IRClosure endClosure = new IRClosure(manager, scope, postExeNode.getLine(), nearestLVarScope.getStaticScope(), Signature.from(postExeNode), CommonByteLists._END_, true); // Create a new nested builder to ensure this gets its own IR builder state like the ensure block stack newIRBuilder(manager, endClosure).buildPrePostExeInner(postExeNode.getBodyNode()); // Add an instruction in 's' to record the end block in the 'topLevel' scope. // SSS FIXME: IR support for end-blocks that access vars in non-toplevel-scopes // might be broken currently. We could either fix it or consider dropping support // for END blocks altogether or only support them in the toplevel. Not worth the pain. addInstr(new RecordEndBlockInstr(topLevel, new WrappedIRClosure(buildSelf(), endClosure))); return manager.getNil(); }
public Operand buildPostExe(PostExeNode postExeNode) { IRScope topLevel = scope.getRootLexicalScope(); IRScope nearestLVarScope = scope.getNearestTopLocalVariableScope(); IRClosure endClosure = new IRClosure(manager, scope, postExeNode.getLine(), nearestLVarScope.getStaticScope(), Signature.from(postExeNode), CommonByteLists._END_, true); // Create a new nested builder to ensure this gets its own IR builder state like the ensure block stack newIRBuilder(manager, endClosure).buildPrePostExeInner(postExeNode.getBodyNode()); // Add an instruction in 's' to record the end block in the 'topLevel' scope. // SSS FIXME: IR support for end-blocks that access vars in non-toplevel-scopes // might be broken currently. We could either fix it or consider dropping support // for END blocks altogether or only support them in the toplevel. Not worth the pain. addInstr(new RecordEndBlockInstr(topLevel, new WrappedIRClosure(buildSelf(), endClosure))); return manager.getNil(); }
public Operand buildPostExe(PostExeNode postExeNode, IRScope s) { IRClosure endClosure = new IRClosure(manager, s, false, postExeNode.getPosition().getStartLine(), postExeNode.getScope(), Arity.procArityOf(postExeNode.getVarNode()), postExeNode.getArgumentType(), !is1_9() && !is2_0()); // Set up %current_scope and %current_module endClosure.addInstr(new CopyInstr(endClosure.getCurrentScopeVariable(), new CurrentScope(endClosure))); endClosure.addInstr(new CopyInstr(endClosure.getCurrentModuleVariable(), new ScopeModule(endClosure))); build(postExeNode.getBodyNode(), endClosure); // Add an instruction to record the end block at runtime s.addInstr(new RecordEndBlockInstr(s, endClosure)); return manager.getNil(); }
public Operand buildPostExe(PostExeNode postExeNode, IRScope s) { IRClosure endClosure = new IRClosure(manager, s, false, postExeNode.getPosition().getStartLine(), postExeNode.getScope(), Arity.procArityOf(postExeNode.getVarNode()), postExeNode.getArgumentType(), !is1_9() && !is2_0()); // Set up %current_scope and %current_module endClosure.addInstr(new CopyInstr(endClosure.getCurrentScopeVariable(), new CurrentScope(endClosure))); endClosure.addInstr(new CopyInstr(endClosure.getCurrentModuleVariable(), new ScopeModule(endClosure))); build(postExeNode.getBodyNode(), endClosure); // Add an instruction to record the end block at runtime s.addInstr(new RecordEndBlockInstr(s, endClosure)); return manager.getNil(); }