forked from jruby/jruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIRLoop.java
More file actions
25 lines (22 loc) · 814 Bytes
/
Copy pathIRLoop.java
File metadata and controls
25 lines (22 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package org.jruby.ir;
import org.jruby.ir.operands.Label;
import org.jruby.ir.operands.Variable;
public class IRLoop {
public final IRScope container;
public final IRLoop parentLoop;
public final Label loopStartLabel;
public final Label loopEndLabel;
public final Label iterStartLabel;
public final Label iterEndLabel;
public final Variable loopResult;
public IRLoop(IRScope s, IRLoop outerLoop) {
container = s;
parentLoop = outerLoop;
loopStartLabel = s.getNewLabel("_LOOP_BEGIN");
loopEndLabel = s.getNewLabel("_LOOP_END");
iterStartLabel = s.getNewLabel("_ITER_BEGIN");
iterEndLabel = s.getNewLabel("_ITER_END");
loopResult = s.getNewTemporaryVariable();
s.setHasLoopsFlag(true);
}
}