File tree Expand file tree Collapse file tree 4 files changed +18
-17
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python Expand file tree Collapse file tree 4 files changed +18
-17
lines changed Original file line number Diff line number Diff line change 27
27
28
28
class MROMergeState {
29
29
30
+ MROMergeState (PythonAbstractClass [] mro ) {
31
+ this .mro = mro ;
32
+ }
33
+
30
34
/** The mro of the base type we're representing. */
31
- public PythonAbstractClass [] mro ;
35
+ private final PythonAbstractClass [] mro ;
32
36
33
37
/**
34
38
* The index of the next item to be merged from mro, or mro.length if this base has been
35
39
* completely merged.
36
40
*/
37
- public int next ;
41
+ private int next ;
38
42
39
43
public boolean isMerged () {
40
44
return mro .length == next ;
@@ -64,5 +68,4 @@ public boolean pastnextContains(PythonAbstractClass candidate) {
64
68
}
65
69
return false ;
66
70
}
67
-
68
71
}
Original file line number Diff line number Diff line change @@ -719,12 +719,10 @@ private static PythonAbstractClass[] computeMethodResolutionOrder(PythonAbstract
719
719
MROMergeState [] toMerge = new MROMergeState [baseClasses .length + 1 ];
720
720
721
721
for (int i = 0 ; i < baseClasses .length ; i ++) {
722
- toMerge [i ] = new MROMergeState ();
723
- toMerge [i ].mro = GetMroNode .getUncached ().execute (baseClasses [i ]);
722
+ toMerge [i ] = new MROMergeState (GetMroNode .getUncached ().execute (baseClasses [i ]));
724
723
}
725
724
726
- toMerge [baseClasses .length ] = new MROMergeState ();
727
- toMerge [baseClasses .length ].mro = baseClasses ;
725
+ toMerge [baseClasses .length ] = new MROMergeState (baseClasses );
728
726
ArrayList <PythonAbstractClass > mro = new ArrayList <>();
729
727
mro .add (cls );
730
728
currentMRO = mergeMROs (toMerge , mro );
Original file line number Diff line number Diff line change @@ -75,22 +75,22 @@ private static enum EntryType {
75
75
76
76
private static class SearchOrderEntry {
77
77
78
- public String suffix ;
79
- public EnumSet <EntryType > type ;
78
+ String suffix ;
79
+ EnumSet <EntryType > type ;
80
80
81
- public SearchOrderEntry (String suffix , EnumSet <EntryType > type ) {
81
+ SearchOrderEntry (String suffix , EnumSet <EntryType > type ) {
82
82
this .suffix = suffix ;
83
83
this .type = type ;
84
84
}
85
85
}
86
86
87
87
protected static class ModuleCodeData {
88
88
89
- public String code ;
90
- public boolean isPackage ;
91
- public String path ;
89
+ String code ;
90
+ boolean isPackage ;
91
+ String path ;
92
92
93
- public ModuleCodeData (String code , boolean isPackage , String path ) {
93
+ ModuleCodeData (String code , boolean isPackage , String path ) {
94
94
this .code = code ;
95
95
this .isPackage = isPackage ;
96
96
this .path = path ;
Original file line number Diff line number Diff line change 45
45
import java .util .ArrayList ;
46
46
import java .util .List ;
47
47
48
- import org .antlr .v4 .runtime .ParserRuleContext ;
49
-
50
48
import com .oracle .graal .python .parser .antlr .Python3BaseVisitor ;
51
49
import com .oracle .graal .python .parser .antlr .Python3Parser .DefparameterContext ;
52
50
import com .oracle .graal .python .parser .antlr .Python3Parser .KwargsparameterContext ;
56
54
import com .oracle .graal .python .parser .antlr .Python3Parser .VsplatparameterContext ;
57
55
import com .oracle .graal .python .runtime .PythonParser .ParserErrorCallback ;
58
56
57
+ import org .antlr .v4 .runtime .ParserRuleContext ;
58
+
59
59
public class ArgListCompiler <T > extends Python3BaseVisitor <T > {
60
- public boolean arglist , keywordlist ;
60
+ private boolean arglist , keywordlist ;
61
61
public final List <String > names ;
62
62
public final List <String > fpnames ;
63
63
public final List <ParserRuleContext > init_code ;
You can’t perform that action at this time.
0 commit comments