Skip to content

Commit 161c0e7

Browse files
committed
[GR-52268] Some fixes in Multibyte*Builtins.
PullRequest: graalpython/3215
2 parents f7aebb3 + abd37ac commit 161c0e7

File tree

9 files changed

+54
-49
lines changed

9 files changed

+54
-49
lines changed

graalpython/com.oracle.graal.python.test/src/tests/test_codecs.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2019, 2023, Oracle and/or its affiliates.
1+
# Copyright (c) 2019, 2024, Oracle and/or its affiliates.
22
# Copyright (C) 1996-2017 Python Software Foundation
33
#
44
# Licensed under the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
@@ -863,5 +863,17 @@ def test_encode_dict_err_xmlcharrefreplace(self):
863863
self.assertEqual((b'\x00\r\x0c\x0b\n\x0e\r\x0c\x0b\x0b\x0e\x01', 4), codecs.charmap_encode('abcd', 'xmlcharrefreplace', codecs.charmap_build('ad0123456789#&;')))
864864

865865

866+
class MultibyteCodecTest(unittest.TestCase):
867+
868+
# just a smoke test
869+
def test_encode(self):
870+
import _codecs_tw
871+
codec = _codecs_tw.getcodec('big5')
872+
873+
self.assertEqual((b'', 0), codec.encode(""))
874+
self.assertRaises(TypeError, codec.encode)
875+
self.assertRaises(UnicodeEncodeError, codec.encode, '\xffff')
876+
877+
866878
if __name__ == '__main__':
867879
unittest.main()

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/cjkcodecs/MultibyteCodecBuiltins.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -81,10 +81,10 @@ public final class MultibyteCodecBuiltins extends PythonBuiltins {
8181

8282
@Override
8383
protected List<? extends NodeFactory<? extends PythonBuiltinBaseNode>> getNodeFactories() {
84-
return MultibyteStreamWriterBuiltinsFactory.getFactories();
84+
return MultibyteCodecBuiltinsFactory.getFactories();
8585
}
8686

87-
@Builtin(name = "encode", minNumOfPositionalArgs = 1, parameterNames = {"$self", "errors"}, doc = "encode($self, /, input, errors=None)\n" + //
87+
@Builtin(name = "encode", minNumOfPositionalArgs = 2, parameterNames = {"$self", "input", "errors"}, doc = "encode($self, /, input, errors=None)\n" + //
8888
"--\n\nReturn an encoded string version of `input\'.\n" + //
8989
"\n\'errors\' may be given to set a different error handling scheme. Default is\n" + //
9090
"\'strict\' meaning that encoding errors raise a UnicodeEncodeError. Other possible\n" + //

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/cjkcodecs/MultibyteDecodeBuffer.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -61,12 +61,14 @@ public class MultibyteDecodeBuffer {
6161
protected CharBuffer writer;
6262
protected PBaseException excobj;
6363

64+
@TruffleBoundary
6465
public MultibyteDecodeBuffer(byte[] inbuf) {
6566
this.inputBuffer = ByteBuffer.wrap(inbuf);
6667
this.writer = writerInit(inbuf.length);
6768
this.excobj = null;
6869
}
6970

71+
@TruffleBoundary(allowInlining = true)
7072
protected int getInSize() {
7173
return inputBuffer.limit();
7274
}
@@ -76,6 +78,7 @@ protected void incInpos(int len) {
7678
setInpos(getInpos() + len);
7779
}
7880

81+
@TruffleBoundary(allowInlining = true)
7982
protected int getInpos() {
8083
return inputBuffer.position();
8184
}
@@ -85,6 +88,7 @@ protected void setInpos(int pos) {
8588
inputBuffer.position(pos);
8689
}
8790

91+
@TruffleBoundary(allowInlining = true)
8892
protected int remaining() {
8993
return inputBuffer.remaining();
9094
}
@@ -102,10 +106,12 @@ protected PBytes createPBytes(PythonObjectFactory factory) {
102106
return factory.createBytes(inputBuffer.array(), getInpos());
103107
}
104108

109+
@TruffleBoundary
105110
protected void replaceInbuf(byte[] inbuf) {
106111
inputBuffer = ByteBuffer.wrap(inbuf);
107112
}
108113

114+
@TruffleBoundary(allowInlining = true)
109115
protected int getOutpos() {
110116
return writer.position();
111117
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/cjkcodecs/MultibyteIncrementalDecoderBuiltins.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
import static com.oracle.graal.python.runtime.exception.PythonErrorType.MemoryError;
5454
import static com.oracle.graal.python.runtime.exception.PythonErrorType.TypeError;
5555
import static com.oracle.graal.python.runtime.exception.PythonErrorType.UnicodeError;
56-
import static com.oracle.graal.python.util.PythonUtils.tsLiteral;
5756

5857
import java.util.Arrays;
5958
import java.util.List;
@@ -71,6 +70,7 @@
7170
import com.oracle.graal.python.lib.PyObjectGetAttr;
7271
import com.oracle.graal.python.nodes.HiddenAttr;
7372
import com.oracle.graal.python.nodes.PRaiseNode;
73+
import com.oracle.graal.python.nodes.StringLiterals;
7474
import com.oracle.graal.python.nodes.function.PythonBuiltinBaseNode;
7575
import com.oracle.graal.python.nodes.function.builtins.PythonBinaryBuiltinNode;
7676
import com.oracle.graal.python.nodes.function.builtins.PythonBinaryClinicBuiltinNode;
@@ -95,15 +95,13 @@ public final class MultibyteIncrementalDecoderBuiltins extends PythonBuiltins {
9595

9696
@Override
9797
protected List<? extends NodeFactory<? extends PythonBuiltinBaseNode>> getNodeFactories() {
98-
return MultibyteStreamWriterBuiltinsFactory.getFactories();
98+
return MultibyteIncrementalDecoderBuiltinsFactory.getFactories();
9999
}
100100

101101
@Builtin(name = J___NEW__, minNumOfPositionalArgs = 1, parameterNames = {"$cls", "errors"})
102102
@GenerateNodeFactory
103103
protected abstract static class NewNode extends PythonBinaryBuiltinNode {
104104

105-
private static final TruffleString CODEC = tsLiteral("codec");
106-
107105
@Specialization
108106
static Object mbstreamreaderNew(VirtualFrame frame, Object type, Object err,
109107
@Bind("this") Node inliningTarget,
@@ -119,7 +117,7 @@ static Object mbstreamreaderNew(VirtualFrame frame, Object type, Object err,
119117

120118
MultibyteIncrementalDecoderObject self = factory.createMultibyteIncrementalDecoderObject(type);
121119

122-
Object codec = getAttr.execute(frame, inliningTarget, type, CODEC);
120+
Object codec = getAttr.execute(frame, inliningTarget, type, StringLiterals.T_CODEC);
123121
if (!(codec instanceof MultibyteCodecObject)) {
124122
throw raiseNode.get(inliningTarget).raise(TypeError, CODEC_IS_UNEXPECTED_TYPE);
125123
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/cjkcodecs/MultibyteIncrementalEncoderBuiltins.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
import static com.oracle.graal.python.runtime.exception.PythonErrorType.TypeError;
5858
import static com.oracle.graal.python.runtime.exception.PythonErrorType.UnicodeError;
5959
import static com.oracle.graal.python.util.PythonUtils.TS_ENCODING;
60-
import static com.oracle.graal.python.util.PythonUtils.tsLiteral;
6160

6261
import java.nio.ByteBuffer;
6362
import java.nio.CharBuffer;
@@ -81,6 +80,7 @@
8180
import com.oracle.graal.python.nodes.HiddenAttr;
8281
import com.oracle.graal.python.nodes.PGuards;
8382
import com.oracle.graal.python.nodes.PRaiseNode;
83+
import com.oracle.graal.python.nodes.StringLiterals;
8484
import com.oracle.graal.python.nodes.function.PythonBuiltinBaseNode;
8585
import com.oracle.graal.python.nodes.function.builtins.PythonBinaryBuiltinNode;
8686
import com.oracle.graal.python.nodes.function.builtins.PythonTernaryClinicBuiltinNode;
@@ -109,15 +109,13 @@ public final class MultibyteIncrementalEncoderBuiltins extends PythonBuiltins {
109109

110110
@Override
111111
protected List<? extends NodeFactory<? extends PythonBuiltinBaseNode>> getNodeFactories() {
112-
return MultibyteStreamWriterBuiltinsFactory.getFactories();
112+
return MultibyteIncrementalEncoderBuiltinsFactory.getFactories();
113113
}
114114

115115
@Builtin(name = J___NEW__, minNumOfPositionalArgs = 1, parameterNames = {"$cls", "errors"})
116116
@GenerateNodeFactory
117117
protected abstract static class NewNode extends PythonBinaryBuiltinNode {
118118

119-
private static final TruffleString CODEC = tsLiteral("codec");
120-
121119
@Specialization
122120
static Object mbstreamreaderNew(VirtualFrame frame, Object type, Object err,
123121
@Bind("this") Node inliningTarget,
@@ -134,7 +132,7 @@ static Object mbstreamreaderNew(VirtualFrame frame, Object type, Object err,
134132

135133
MultibyteIncrementalEncoderObject self = factory.createMultibyteIncrementalEncoderObject(type);
136134

137-
Object codec = getAttr.execute(frame, inliningTarget, type, CODEC);
135+
Object codec = getAttr.execute(frame, inliningTarget, type, StringLiterals.T_CODEC);
138136
if (!(codec instanceof MultibyteCodecObject)) {
139137
throw raiseNode.get(inliningTarget).raise(TypeError, CODEC_IS_UNEXPECTED_TYPE);
140138
}
@@ -152,7 +150,7 @@ static Object mbstreamreaderNew(VirtualFrame frame, Object type, Object err,
152150
public abstract static class InitNode extends PythonUnaryBuiltinNode {
153151

154152
@Specialization
155-
PNone init(@SuppressWarnings("unused") MultibyteIncrementalEncoderObject self) {
153+
static PNone init(@SuppressWarnings("unused") MultibyteIncrementalEncoderObject self) {
156154
return PNone.NONE;
157155
}
158156
}
@@ -245,12 +243,11 @@ protected ArgumentClinicProvider getArgumentClinic() {
245243
}
246244

247245
@Specialization
248-
Object encode(VirtualFrame frame, MultibyteStatefulEncoderContext ctx, Object unistr, int end,
246+
static Object encode(VirtualFrame frame, MultibyteStatefulEncoderContext ctx, Object unistr, int end,
249247
@Cached EncodeStatefulNode encodeStatefulNode,
250248
@Cached PythonObjectFactory factory) {
251249
return encodeStatefulNode.execute(frame, ctx, unistr, end, factory);
252250
}
253-
254251
}
255252

256253
@Builtin(name = "getstate", minNumOfPositionalArgs = 1, parameterNames = {"$self"}, doc = "getstate($self, /)\n--\n\n")
@@ -296,7 +293,7 @@ static Object getstate(MultibyteIncrementalEncoderObject self,
296293
}
297294
}
298295

299-
@Builtin(name = "setstate", minNumOfPositionalArgs = 1, parameterNames = {"$self"}, doc = "setstate($self, state, /)\n--\n\n")
296+
@Builtin(name = "setstate", parameterNames = {"$self", "state"}, doc = "setstate($self, state, /)\n--\n\n")
300297
@GenerateNodeFactory
301298
abstract static class SetStateNode extends PythonBinaryBuiltinNode {
302299

@@ -352,7 +349,5 @@ static Object reset(MultibyteIncrementalEncoderObject self) {
352349
self.pending = null;
353350
return PNone.NONE;
354351
}
355-
356352
}
357-
358353
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/cjkcodecs/MultibyteStreamReaderBuiltins.java

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -51,7 +51,6 @@
5151
import static com.oracle.graal.python.nodes.SpecialMethodNames.J___NEW__;
5252
import static com.oracle.graal.python.nodes.StringLiterals.T_EMPTY_STRING;
5353
import static com.oracle.graal.python.runtime.exception.PythonErrorType.TypeError;
54-
import static com.oracle.graal.python.util.PythonUtils.tsLiteral;
5554

5655
import java.util.List;
5756

@@ -69,10 +68,10 @@
6968
import com.oracle.graal.python.lib.PyObjectGetAttr;
7069
import com.oracle.graal.python.nodes.PNodeWithContext;
7170
import com.oracle.graal.python.nodes.PRaiseNode;
71+
import com.oracle.graal.python.nodes.StringLiterals;
7272
import com.oracle.graal.python.nodes.function.PythonBuiltinBaseNode;
7373
import com.oracle.graal.python.nodes.function.builtins.PythonBinaryClinicBuiltinNode;
7474
import com.oracle.graal.python.nodes.function.builtins.PythonTernaryBuiltinNode;
75-
import com.oracle.graal.python.nodes.function.builtins.PythonTernaryClinicBuiltinNode;
7675
import com.oracle.graal.python.nodes.function.builtins.PythonUnaryBuiltinNode;
7776
import com.oracle.graal.python.nodes.function.builtins.clinic.ArgumentClinicProvider;
7877
import com.oracle.graal.python.nodes.object.GetClassNode;
@@ -94,15 +93,13 @@ public final class MultibyteStreamReaderBuiltins extends PythonBuiltins {
9493

9594
@Override
9695
protected List<? extends NodeFactory<? extends PythonBuiltinBaseNode>> getNodeFactories() {
97-
return MultibyteStreamWriterBuiltinsFactory.getFactories();
96+
return MultibyteStreamReaderBuiltinsFactory.getFactories();
9897
}
9998

10099
@Builtin(name = J___NEW__, minNumOfPositionalArgs = 2, parameterNames = {"$cls", "stream", "errors"})
101100
@GenerateNodeFactory
102101
protected abstract static class NewNode extends PythonTernaryBuiltinNode {
103102

104-
private static final TruffleString CODEC = tsLiteral("codec");
105-
106103
@Specialization
107104
static Object mbstreamreaderNew(VirtualFrame frame, Object type, Object stream, Object err,
108105
@Bind("this") Node inliningTarget,
@@ -118,7 +115,7 @@ static Object mbstreamreaderNew(VirtualFrame frame, Object type, Object stream,
118115
}
119116

120117
MultibyteStreamReaderObject self = factory.createMultibyteStreamReaderObject(type);
121-
Object codec = getAttr.execute(frame, inliningTarget, type, CODEC);
118+
Object codec = getAttr.execute(frame, inliningTarget, type, StringLiterals.T_CODEC);
122119
if (!(codec instanceof MultibyteCodecObject)) {
123120
throw raiseNode.get(inliningTarget).raise(TypeError, CODEC_IS_UNEXPECTED_TYPE);
124121
}
@@ -232,40 +229,36 @@ static TruffleString iread(VirtualFrame frame, MultibyteStreamReaderObject self,
232229
@Builtin(name = "read", minNumOfPositionalArgs = 1, parameterNames = {"$self", "sizeobj"}, doc = "read($self, sizeobj=None, /)\n--\n\n")
233230
@ArgumentClinic(name = "sizeobj", conversion = ArgumentClinic.ClinicConversion.Long, defaultValue = "-1", useDefaultForNone = true)
234231
@GenerateNodeFactory
235-
abstract static class ReadNode extends PythonTernaryClinicBuiltinNode {
232+
abstract static class ReadNode extends PythonBinaryClinicBuiltinNode {
236233

237234
@Override
238235
protected ArgumentClinicProvider getArgumentClinic() {
239236
return MultibyteStreamReaderBuiltinsClinicProviders.ReadNodeClinicProviderGen.INSTANCE;
240237
}
241238

242-
private static final TruffleString READ = tsLiteral("read");
243-
244239
// _multibytecodec_MultibyteStreamReader_read_impl
245240
@Specialization
246-
Object read(VirtualFrame frame, MultibyteStreamReaderObject self, long size,
241+
static Object read(VirtualFrame frame, MultibyteStreamReaderObject self, long size,
247242
@Cached IReadNode iReadNode) {
248-
return iReadNode.execute(frame, self, READ, size);
243+
return iReadNode.execute(frame, self, StringLiterals.T_READ, size);
249244
}
250245
}
251246

252247
@Builtin(name = "readline", minNumOfPositionalArgs = 1, parameterNames = {"$self", "sizeobj"}, doc = "readline($self, sizeobj=None, /)\n--\n\n")
253248
@ArgumentClinic(name = "sizeobj", conversion = ArgumentClinic.ClinicConversion.Long, defaultValue = "-1", useDefaultForNone = true)
254249
@GenerateNodeFactory
255-
abstract static class ReadlineNode extends PythonTernaryClinicBuiltinNode {
250+
abstract static class ReadlineNode extends PythonBinaryClinicBuiltinNode {
256251

257252
@Override
258253
protected ArgumentClinicProvider getArgumentClinic() {
259254
return MultibyteStreamReaderBuiltinsClinicProviders.ReadlineNodeClinicProviderGen.INSTANCE;
260255
}
261256

262-
private static final TruffleString READLINE = tsLiteral("readline");
263-
264257
// _multibytecodec_MultibyteStreamReader_readline_impl
265258
@Specialization
266-
Object readline(VirtualFrame frame, MultibyteStreamReaderObject self, long size,
259+
static Object readline(VirtualFrame frame, MultibyteStreamReaderObject self, long size,
267260
@Cached IReadNode iReadNode) {
268-
return iReadNode.execute(frame, self, READLINE, size);
261+
return iReadNode.execute(frame, self, StringLiterals.T_READLINE, size);
269262
}
270263
}
271264

@@ -279,14 +272,12 @@ protected ArgumentClinicProvider getArgumentClinic() {
279272
return MultibyteStreamReaderBuiltinsClinicProviders.ReadlinesNodeClinicProviderGen.INSTANCE;
280273
}
281274

282-
private static final TruffleString READ = tsLiteral("read");
283-
284275
// _multibytecodec_MultibyteStreamReader_readlines_impl
285276
@Specialization
286-
Object readlines(VirtualFrame frame, MultibyteStreamReaderObject self, long sizehint,
277+
static Object readlines(VirtualFrame frame, MultibyteStreamReaderObject self, long sizehint,
287278
@Cached StringBuiltins.SplitLinesNode splitLinesNode,
288279
@Cached IReadNode iReadNode) {
289-
TruffleString r = iReadNode.execute(frame, self, READ, sizehint);
280+
TruffleString r = iReadNode.execute(frame, self, StringLiterals.T_READ, sizehint);
290281
return splitLinesNode.execute(frame, r, true);
291282
}
292283
}
@@ -310,7 +301,7 @@ static Object reset(MultibyteStreamReaderObject self) {
310301
abstract static class StreamMemberNode extends PythonUnaryBuiltinNode {
311302

312303
@Specialization
313-
Object stream(MultibyteStreamReaderObject self) {
304+
static Object stream(MultibyteStreamReaderObject self) {
314305
return self.stream;
315306
}
316307
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/cjkcodecs/MultibyteStreamWriterBuiltins.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -65,6 +65,7 @@
6565
import com.oracle.graal.python.lib.PyObjectCallMethodObjArgs;
6666
import com.oracle.graal.python.lib.PyObjectGetAttr;
6767
import com.oracle.graal.python.nodes.PRaiseNode;
68+
import com.oracle.graal.python.nodes.StringLiterals;
6869
import com.oracle.graal.python.nodes.function.PythonBuiltinBaseNode;
6970
import com.oracle.graal.python.nodes.function.PythonBuiltinNode;
7071
import com.oracle.graal.python.nodes.function.builtins.PythonBinaryBuiltinNode;
@@ -97,8 +98,6 @@ protected List<? extends NodeFactory<? extends PythonBuiltinBaseNode>> getNodeFa
9798
@GenerateNodeFactory
9899
protected abstract static class NewNode extends PythonBuiltinNode {
99100

100-
private static final TruffleString CODEC = tsLiteral("codec");
101-
102101
@Specialization
103102
static Object mbstreamwriterNew(VirtualFrame frame, Object type, Object stream, Object err,
104103
@Bind("this") Node inliningTarget,
@@ -114,7 +113,7 @@ static Object mbstreamwriterNew(VirtualFrame frame, Object type, Object stream,
114113

115114
MultibyteStreamWriterObject self = factory.createMultibyteStreamWriterObject(type);
116115

117-
Object codec = getAttr.execute(frame, inliningTarget, type, CODEC);
116+
Object codec = getAttr.execute(frame, inliningTarget, type, StringLiterals.T_CODEC);
118117
if (!(codec instanceof MultibyteCodecObject)) {
119118
throw raiseNode.get(inliningTarget).raise(TypeError, CODEC_IS_UNEXPECTED_TYPE);
120119
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/pickle/PickleUtils.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
import com.oracle.graal.python.builtins.objects.str.StringUtils;
6262
import com.oracle.graal.python.lib.PyObjectLookupAttr;
6363
import com.oracle.graal.python.nodes.PRaiseNode;
64+
import com.oracle.graal.python.nodes.StringLiterals;
6465
import com.oracle.graal.python.runtime.object.PythonObjectFactory;
6566
import com.oracle.graal.python.util.PythonUtils;
6667
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
@@ -87,8 +88,8 @@ public final class PickleUtils {
8788
public static final TruffleString T_CP_REVERSE_IMPORT_MAPPING = StringUtils.cat(T_MOD_COMPAT_PICKLE, T_DOT, T_ATTR_REVERSE_IMPORT_MAPPING);
8889
public static final TruffleString T_METHOD_ENCODE = tsLiteral("encode");
8990
public static final TruffleString T_METHOD_PARTIAL = tsLiteral("partial");
90-
public static final TruffleString T_METHOD_READ = tsLiteral("read");
91-
public static final TruffleString T_METHOD_READLINE = tsLiteral("readline");
91+
public static final TruffleString T_METHOD_READ = StringLiterals.T_READ;
92+
public static final TruffleString T_METHOD_READLINE = StringLiterals.T_READLINE;
9293
public static final TruffleString T_METHOD_READINTO = tsLiteral("readinto");
9394
public static final TruffleString T_METHOD_PEEK = tsLiteral("peek");
9495
public static final TruffleString T_METHOD_WRITE = tsLiteral("write");

0 commit comments

Comments
 (0)