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 2727
2828class MROMergeState {
2929
30+ MROMergeState (PythonAbstractClass [] mro ) {
31+ this .mro = mro ;
32+ }
33+
3034 /** The mro of the base type we're representing. */
31- public PythonAbstractClass [] mro ;
35+ private final PythonAbstractClass [] mro ;
3236
3337 /**
3438 * The index of the next item to be merged from mro, or mro.length if this base has been
3539 * completely merged.
3640 */
37- public int next ;
41+ private int next ;
3842
3943 public boolean isMerged () {
4044 return mro .length == next ;
@@ -64,5 +68,4 @@ public boolean pastnextContains(PythonAbstractClass candidate) {
6468 }
6569 return false ;
6670 }
67-
6871}
Original file line number Diff line number Diff line change @@ -719,12 +719,10 @@ private static PythonAbstractClass[] computeMethodResolutionOrder(PythonAbstract
719719 MROMergeState [] toMerge = new MROMergeState [baseClasses .length + 1 ];
720720
721721 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 ]));
724723 }
725724
726- toMerge [baseClasses .length ] = new MROMergeState ();
727- toMerge [baseClasses .length ].mro = baseClasses ;
725+ toMerge [baseClasses .length ] = new MROMergeState (baseClasses );
728726 ArrayList <PythonAbstractClass > mro = new ArrayList <>();
729727 mro .add (cls );
730728 currentMRO = mergeMROs (toMerge , mro );
Original file line number Diff line number Diff line change @@ -75,22 +75,22 @@ private static enum EntryType {
7575
7676 private static class SearchOrderEntry {
7777
78- public String suffix ;
79- public EnumSet <EntryType > type ;
78+ String suffix ;
79+ EnumSet <EntryType > type ;
8080
81- public SearchOrderEntry (String suffix , EnumSet <EntryType > type ) {
81+ SearchOrderEntry (String suffix , EnumSet <EntryType > type ) {
8282 this .suffix = suffix ;
8383 this .type = type ;
8484 }
8585 }
8686
8787 protected static class ModuleCodeData {
8888
89- public String code ;
90- public boolean isPackage ;
91- public String path ;
89+ String code ;
90+ boolean isPackage ;
91+ String path ;
9292
93- public ModuleCodeData (String code , boolean isPackage , String path ) {
93+ ModuleCodeData (String code , boolean isPackage , String path ) {
9494 this .code = code ;
9595 this .isPackage = isPackage ;
9696 this .path = path ;
Original file line number Diff line number Diff line change 4545import java .util .ArrayList ;
4646import java .util .List ;
4747
48- import org .antlr .v4 .runtime .ParserRuleContext ;
49-
5048import com .oracle .graal .python .parser .antlr .Python3BaseVisitor ;
5149import com .oracle .graal .python .parser .antlr .Python3Parser .DefparameterContext ;
5250import com .oracle .graal .python .parser .antlr .Python3Parser .KwargsparameterContext ;
5654import com .oracle .graal .python .parser .antlr .Python3Parser .VsplatparameterContext ;
5755import com .oracle .graal .python .runtime .PythonParser .ParserErrorCallback ;
5856
57+ import org .antlr .v4 .runtime .ParserRuleContext ;
58+
5959public class ArgListCompiler <T > extends Python3BaseVisitor <T > {
60- public boolean arglist , keywordlist ;
60+ private boolean arglist , keywordlist ;
6161 public final List <String > names ;
6262 public final List <String > fpnames ;
6363 public final List <ParserRuleContext > init_code ;
You can’t perform that action at this time.
0 commit comments