-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathGotoLabels.java
More file actions
44 lines (39 loc) · 1.19 KB
/
GotoLabels.java
File metadata and controls
44 lines (39 loc) · 1.19 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package org.perlonjava.codegen;
import org.objectweb.asm.Label;
/**
* Represents a labeled destination for GOTO statements in bytecode generation.
* Maintains the mapping between source code labels and ASM labels along with stack state.
*/
public class GotoLabels {
/**
* The name of the label as it appears in the source code
*/
public String labelName;
/**
* The ASM Label object used for bytecode generation
*/
public Label gotoLabel;
/**
* Creates a new GotoLabels instance.
*
* @param labelName The name of the label in source code
* @param gotoLabel The ASM Label object for bytecode generation
*/
public GotoLabels(String labelName, Label gotoLabel) {
this.labelName = labelName;
this.gotoLabel = gotoLabel;
}
/**
* Returns a string representation of the GotoLabels object.
* Useful for debugging and logging purposes.
*
* @return A string containing all fields of this object
*/
@Override
public String toString() {
return "GotoLabels{" +
"labelName='" + labelName + '\'' +
", gotoLabel=" + gotoLabel +
'}';
}
}