@Override public Label getNewLabel() { return getNewLabel("CL" + closureId + "_LBL"); }
@Override public Label getNewLabel() { return getNewLabel("CL" + closureId + "_LBL"); }
@Override public Label getNewLabel() { return getNewLabel("CL" + closureId + "_LBL"); }
@Override public Label getNewLabel() { return getNewLabel("CL" + closureId + "_LBL"); }
protected IRClosure(IRManager manager, IRScope lexicalParent, int lineNumber, StaticScope staticScope, ByteList prefix) { super(manager, lexicalParent, null, lineNumber, staticScope); this.startLabel = getNewLabel(prefix + "START"); this.endLabel = getNewLabel(prefix + "END"); this.closureId = lexicalParent.getNextClosureId(); ByteList name = prefix.dup(); name.append(Integer.toString(closureId).getBytes()); setName(manager.getRuntime().newSymbol(name)); this.body = null; }
protected IRClosure(IRManager manager, IRScope lexicalParent, int lineNumber, StaticScope staticScope, ByteList prefix) { super(manager, lexicalParent, null, lineNumber, staticScope); this.startLabel = getNewLabel(prefix + "START"); this.endLabel = getNewLabel(prefix + "END"); this.closureId = lexicalParent.getNextClosureId(); ByteList name = prefix.dup(); name.append(Integer.toString(closureId).getBytes()); setName(manager.getRuntime().newSymbol(name)); this.body = null; }
protected IRClosure(IRManager manager, IRScope lexicalParent, String fileName, int lineNumber, StaticScope staticScope, String prefix) { super(manager, lexicalParent, null, fileName, lineNumber, staticScope); this.isForLoopBody = false; this.startLabel = getNewLabel(prefix + "START"); this.endLabel = getNewLabel(prefix + "END"); this.closureId = lexicalParent.getNextClosureId(); setName(prefix + closureId); this.body = null; this.parameterList = new String[] {}; // set nesting depth int n = 0; IRScope s = this; while (s instanceof IRClosure) { if (!s.isForLoopBody()) n++; s = s.getLexicalParent(); } this.nestingDepth = n; }
protected IRClosure(IRManager manager, IRScope lexicalParent, String fileName, int lineNumber, StaticScope staticScope, String prefix) { super(manager, lexicalParent, null, fileName, lineNumber, staticScope); this.isForLoopBody = false; this.startLabel = getNewLabel(prefix + "START"); this.endLabel = getNewLabel(prefix + "END"); this.closureId = lexicalParent.getNextClosureId(); setName(prefix + closureId); this.body = null; this.parameterList = new String[] {}; // set nesting depth int n = 0; IRScope s = this; while (s instanceof IRClosure) { if (!s.isForLoopBody()) n++; s = s.getLexicalParent(); } this.nestingDepth = n; }
/** Used by cloning code */ private IRClosure(IRClosure c, IRScope lexicalParent) { super(c, lexicalParent); this.closureId = lexicalParent.getNextClosureId(); setName("_CLOSURE_CLONE_" + closureId); this.startLabel = getNewLabel(getName() + "_START"); this.endLabel = getNewLabel(getName() + "_END"); this.body = (c.body instanceof InterpretedIRBlockBody19) ? new InterpretedIRBlockBody19(this, c.body.arity(), c.body.getArgumentType()) : new InterpretedIRBlockBody(this, c.body.arity(), c.body.getArgumentType()); this.addedGEBForUncaughtBreaks = false; }
/** Used by cloning code */ private IRClosure(IRClosure c, IRScope lexicalParent) { super(c, lexicalParent); this.closureId = lexicalParent.getNextClosureId(); setName("_CLOSURE_CLONE_" + closureId); this.startLabel = getNewLabel(getName() + "_START"); this.endLabel = getNewLabel(getName() + "_END"); this.body = (c.body instanceof InterpretedIRBlockBody19) ? new InterpretedIRBlockBody19(this, c.body.arity(), c.body.getArgumentType()) : new InterpretedIRBlockBody(this, c.body.arity(), c.body.getArgumentType()); this.addedGEBForUncaughtBreaks = false; }
/** Used by cloning code */ /* Inlining generates a new name and id and basic cloning will reuse the originals name */ protected IRClosure(IRClosure c, IRScope lexicalParent, int closureId, RubySymbol fullName) { super(c, lexicalParent); this.closureId = closureId; super.setName(fullName); this.startLabel = getNewLabel(getId() + "_START"); this.endLabel = getNewLabel(getId() + "_END"); if (getManager().isDryRun()) { this.body = null; } else { boolean shouldJit = getManager().getInstanceConfig().getCompileMode().shouldJIT(); this.body = shouldJit ? new MixedModeIRBlockBody(c, c.getSignature()) : new InterpretedIRBlockBody(c, c.getSignature()); } this.signature = c.signature; }
/** Used by cloning code */ /* Inlining generates a new name and id and basic cloning will reuse the originals name */ protected IRClosure(IRClosure c, IRScope lexicalParent, int closureId, RubySymbol fullName) { super(c, lexicalParent); this.closureId = closureId; super.setName(fullName); this.startLabel = getNewLabel(getId() + "_START"); this.endLabel = getNewLabel(getId() + "_END"); if (getManager().isDryRun()) { this.body = null; } else { boolean shouldJit = getManager().getInstanceConfig().getCompileMode().shouldJIT(); this.body = shouldJit ? new MixedModeIRBlockBody(c, c.getSignature()) : new InterpretedIRBlockBody(c, c.getSignature()); } this.signature = c.signature; }