|
137 | 137 | import com.oracle.graal.python.runtime.sequence.storage.ByteSequenceStorage;
|
138 | 138 | import com.oracle.graal.python.util.FileDeleteShutdownHook;
|
139 | 139 | import com.oracle.truffle.api.CompilerDirectives;
|
140 |
| -import com.oracle.truffle.api.TruffleFile; |
141 |
| -import com.oracle.truffle.api.TruffleLogger; |
142 | 140 | import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
|
143 | 141 | import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
|
| 142 | +import com.oracle.truffle.api.TruffleFile; |
144 | 143 | import com.oracle.truffle.api.TruffleLanguage.Env;
|
| 144 | +import com.oracle.truffle.api.TruffleLogger; |
145 | 145 | import com.oracle.truffle.api.dsl.Cached;
|
| 146 | +import com.oracle.truffle.api.dsl.Cached.Shared; |
146 | 147 | import com.oracle.truffle.api.dsl.Fallback;
|
147 | 148 | import com.oracle.truffle.api.dsl.GenerateNodeFactory;
|
148 | 149 | import com.oracle.truffle.api.dsl.ImportStatic;
|
149 | 150 | import com.oracle.truffle.api.dsl.NodeFactory;
|
150 | 151 | import com.oracle.truffle.api.dsl.Specialization;
|
151 | 152 | import com.oracle.truffle.api.dsl.TypeSystemReference;
|
152 |
| -import com.oracle.truffle.api.dsl.Cached.Shared; |
153 | 153 | import com.oracle.truffle.api.frame.VirtualFrame;
|
154 | 154 | import com.oracle.truffle.api.library.CachedLibrary;
|
155 | 155 | import com.oracle.truffle.api.profiles.BranchProfile;
|
@@ -803,7 +803,7 @@ public static StatNode create() {
|
803 | 803 | @GenerateNodeFactory
|
804 | 804 | @TypeSystemReference(PythonArithmeticTypes.class)
|
805 | 805 | public abstract static class ListdirNode extends PythonBuiltinNode {
|
806 |
| - @Specialization(limit = "1") |
| 806 | + @Specialization(limit = "3") |
807 | 807 | Object listdir(VirtualFrame frame, Object pathArg,
|
808 | 808 | @CachedLibrary("pathArg") PythonObjectLibrary lib) {
|
809 | 809 | String path = lib.asPath(pathArg);
|
@@ -918,13 +918,13 @@ int dupOvf(VirtualFrame frame, PInt fd, PInt fd2) {
|
918 | 918 | @TypeSystemReference(PythonArithmeticTypes.class)
|
919 | 919 | public abstract static class OpenNode extends PythonFileNode {
|
920 | 920 |
|
921 |
| - @Specialization(guards = {"isNoValue(mode)", "isNoValue(dir_fd)"}, limit = "1") |
| 921 | + @Specialization(guards = {"isNoValue(mode)", "isNoValue(dir_fd)"}, limit = "3") |
922 | 922 | Object open(VirtualFrame frame, Object pathname, long flags, @SuppressWarnings("unused") PNone mode, PNone dir_fd,
|
923 | 923 | @CachedLibrary("pathname") PythonObjectLibrary lib) {
|
924 | 924 | return openMode(frame, pathname, flags, 0777, dir_fd, lib);
|
925 | 925 | }
|
926 | 926 |
|
927 |
| - @Specialization(guards = {"isNoValue(dir_fd)"}, limit = "1") |
| 927 | + @Specialization(guards = {"isNoValue(dir_fd)"}, limit = "3") |
928 | 928 | Object openMode(VirtualFrame frame, Object pathArg, long flags, long fileMode, @SuppressWarnings("unused") PNone dir_fd,
|
929 | 929 | @CachedLibrary("pathArg") PythonObjectLibrary lib) {
|
930 | 930 | String pathname = lib.asPath(pathArg);
|
@@ -1085,7 +1085,7 @@ private static void closeChannel(Channel channel) throws IOException {
|
1085 | 1085 | @TypeSystemReference(PythonArithmeticTypes.class)
|
1086 | 1086 | public abstract static class UnlinkNode extends PythonFileNode {
|
1087 | 1087 |
|
1088 |
| - @Specialization(limit = "1") |
| 1088 | + @Specialization(limit = "3") |
1089 | 1089 | Object unlink(VirtualFrame frame, Object pathArg,
|
1090 | 1090 | @CachedLibrary("pathArg") PythonObjectLibrary lib) {
|
1091 | 1091 | String path = lib.asPath(pathArg);
|
@@ -1113,13 +1113,13 @@ public abstract static class RmdirNode extends UnlinkNode {
|
1113 | 1113 | @TypeSystemReference(PythonArithmeticTypes.class)
|
1114 | 1114 | public abstract static class MkdirNode extends PythonFileNode {
|
1115 | 1115 |
|
1116 |
| - @Specialization(limit = "1") |
| 1116 | + @Specialization(limit = "3") |
1117 | 1117 | Object mkdir(VirtualFrame frame, Object path, @SuppressWarnings("unused") PNone mode, PNone dirFd,
|
1118 | 1118 | @CachedLibrary("path") PythonObjectLibrary lib) {
|
1119 | 1119 | return mkdirMode(frame, path, 511, dirFd, lib);
|
1120 | 1120 | }
|
1121 | 1121 |
|
1122 |
| - @Specialization(limit = "1") |
| 1122 | + @Specialization(limit = "3") |
1123 | 1123 | Object mkdirMode(VirtualFrame frame, Object pathArg, @SuppressWarnings("unused") int mode, @SuppressWarnings("unused") PNone dirFd,
|
1124 | 1124 | @CachedLibrary("pathArg") PythonObjectLibrary lib) {
|
1125 | 1125 | String path = lib.asPath(pathArg);
|
|
0 commit comments