-
-
Notifications
You must be signed in to change notification settings - Fork 925
Commit
- 9.4.12.0
- 9.4.11.0
- 9.4.10.0
- 9.4.9.0
- 9.4.8.0
- 9.4.7.0
- 9.4.6.0
- 9.4.5.0
- 9.4.4.0
- 9.4.3.0
- 9.4.2.0
- 9.4.1.0
- 9.4.0.0
- 9.3.15.0
- 9.3.14.0
- 9.3.13.0
- 9.3.12.0
- 9.3.11.0
- 9.3.10.0
- 9.3.9.0
- 9.3.8.0
- 9.3.7.0
- 9.3.6.0
- 9.3.5.0
- 9.3.4.0
- 9.3.3.0
- 9.3.2.0
- 9.3.1.0
- 9.3.0.0
- 9.2.21.0
- 9.2.20.1
- 9.2.20.0
- 9.2.19.0
- 9.2.18.0
- 9.2.17.0
- 9.2.16.0
- 9.2.15.0
- 9.2.14.0
- 9.2.13.0
- 9.2.12.0
- 9.2.11.1
- 9.2.11.0
- 9.2.10.0
- 9.2.9.0
- 9.2.8.0
- 9.2.7.0
- 9.2.6.0
- 9.2.5.0
- 9.2.4.1
- 9.2.4.0
- 9.2.3.0
- 9.2.2.0
- 9.2.1.0
- 9.2.0.0
- 9.1.17.0
- 9.1.16.0
- 9.1.15.0
- 9.1.14.0
- 9.1.13.0
- 9.1.12.0
- 9.1.11.0
- 9.1.10.0
- 9.1.9.0
- 9.1.8.0
- 9.1.7.0
- 9.1.6.0
- 9.1.5.0
- 9.1.4.0
- 9.1.3.0
- 9.1.2.0
- 9.1.1.0
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,16 +15,11 @@ | |
|
||
import java.util.Arrays; | ||
|
||
/** | ||
* {@link InternalMethod} objects are copied as properties such as visibility are changed. {@link SharedMethodInfo} stores | ||
* the state that does not change, such as where the method was defined. | ||
*/ | ||
public class SharedMethodInfo { | ||
|
||
private final SourceSection sourceSection; | ||
private final LexicalScope lexicalScope; | ||
private final Arity arity; | ||
/** The original name of the method. Does not change when aliased. */ | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
chrisseaton
Author
Contributor
|
||
private final String name; | ||
private final String indicativeName; | ||
private final boolean isBlock; | ||
|
@@ -33,14 +28,27 @@ public class SharedMethodInfo { | |
private final boolean alwaysInline; | ||
private final boolean needsCallerFrame; | ||
|
||
public SharedMethodInfo(SourceSection sourceSection, LexicalScope lexicalScope, Arity arity, String name, String indicativeName, boolean isBlock, ArgumentDescriptor[] argumentDescriptors, boolean alwaysClone, boolean alwaysInline, boolean needsCallerFrame) { | ||
public SharedMethodInfo( | ||
SourceSection sourceSection, | ||
LexicalScope lexicalScope, | ||
Arity arity, String name, | ||
String indicativeName, | ||
boolean isBlock, | ||
ArgumentDescriptor[] argumentDescriptors, | ||
boolean alwaysClone, | ||
boolean alwaysInline, | ||
boolean needsCallerFrame) { | ||
if (argumentDescriptors == null) { | ||
argumentDescriptors = new ArgumentDescriptor[]{}; | ||
} | ||
|
||
this.sourceSection = sourceSection; | ||
this.lexicalScope = lexicalScope; | ||
this.arity = arity; | ||
this.name = name; | ||
this.indicativeName = indicativeName; | ||
this.isBlock = isBlock; | ||
this.argumentDescriptors = argumentDescriptors == null ? new ArgumentDescriptor[] {} : argumentDescriptors; | ||
this.argumentDescriptors = argumentDescriptors; | ||
this.alwaysClone = alwaysClone; | ||
this.alwaysInline = alwaysInline; | ||
this.needsCallerFrame = needsCallerFrame; | ||
|
@@ -87,7 +95,17 @@ public boolean needsCallerFrame() { | |
} | ||
|
||
public SharedMethodInfo withName(String newName) { | ||
return new SharedMethodInfo(sourceSection, lexicalScope, arity, newName, newName, isBlock, argumentDescriptors, alwaysClone, alwaysInline, needsCallerFrame); | ||
return new SharedMethodInfo( | ||
sourceSection, | ||
lexicalScope, | ||
arity, | ||
newName, | ||
newName, | ||
isBlock, | ||
argumentDescriptors, | ||
alwaysClone, | ||
alwaysInline, | ||
needsCallerFrame); | ||
} | ||
|
||
@Override | ||
|
I liked my comment, this one indicates that InternalMethod name can change, but this never does.
The top-level comment might be useful as well to say this is all data derived from parsing a method definition and never changes.