@@ -30,13 +30,12 @@ protected void releaseMemory() {
30
30
31
31
@ Override
32
32
public Proto getProto () {
33
- return method .getProto ();
33
+ return method == null ? null : method .getProto ();
34
34
}
35
35
36
36
public InvokeExpr (VT type , Value [] args , String ownerType , String methodName , String [] argmentTypes ,
37
37
String returnType ) {
38
- super (type , args );
39
- this .method = new Method (ownerType , methodName , argmentTypes , returnType );
38
+ this (type , args , new Method (ownerType , methodName , argmentTypes , returnType ));
40
39
}
41
40
42
41
public InvokeExpr (VT type , Value [] args , Method method ) {
@@ -45,12 +44,12 @@ public InvokeExpr(VT type, Value[] args, Method method) {
45
44
}
46
45
47
46
@ Override
48
- public Value clone () {
47
+ public InvokeExpr clone () {
49
48
return new InvokeExpr (vt , cloneOps (), method );
50
49
}
51
50
52
51
@ Override
53
- public Value clone (LabelAndLocalMapper mapper ) {
52
+ public InvokeExpr clone (LabelAndLocalMapper mapper ) {
54
53
return new InvokeExpr (vt , cloneOps (mapper ), method );
55
54
}
56
55
@@ -59,13 +58,13 @@ public String toString0() {
59
58
StringBuilder sb = new StringBuilder ();
60
59
61
60
int i = 0 ;
62
- if (super . vt == VT .INVOKE_NEW ) {
63
- sb .append ("new " ).append (Util .toShortClassName (method . getOwner ()));
64
- } else if (super . vt == VT .INVOKE_STATIC ) {
65
- sb .append (Util .toShortClassName (method . getOwner ())).append ('.' )
66
- .append (this . method . getName ());
61
+ if (vt == VT .INVOKE_NEW ) {
62
+ sb .append ("new " ).append (Util .toShortClassName (getOwner ()));
63
+ } else if (vt == VT .INVOKE_STATIC ) {
64
+ sb .append (Util .toShortClassName (getOwner ())).append ('.' )
65
+ .append (getName ());
67
66
} else {
68
- sb .append (ops [i ++]).append ('.' ).append (this . method . getName ());
67
+ sb .append (ops [i ++]).append ('.' ).append (getName ());
69
68
}
70
69
sb .append ('(' );
71
70
boolean first = true ;
@@ -82,19 +81,19 @@ public String toString0() {
82
81
}
83
82
84
83
public String getOwner () {
85
- return method .getOwner ();
84
+ return method == null ? null : method .getOwner ();
86
85
}
87
86
88
87
public String getRet () {
89
- return method .getReturnType ();
88
+ return method == null ? null : method .getReturnType ();
90
89
}
91
90
92
91
public String getName () {
93
- return method .getName ();
92
+ return method == null ? null : method .getName ();
94
93
}
95
94
96
95
public String [] getArgs () {
97
- return method .getParameterTypes ();
96
+ return method == null ? null : method .getParameterTypes ();
98
97
}
99
98
100
99
}
0 commit comments