Skip to content

Commit f0472b0

Browse files
committed
Disambiguate execute methods in 'SSN.SetItemNode'.
1 parent ff74007 commit f0472b0

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/CExtNodes.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,11 @@ String doString(String object) {
297297
return object;
298298
}
299299

300+
@Specialization
301+
byte doLong(byte b) {
302+
return b;
303+
}
304+
300305
@Specialization
301306
int doLong(int i) {
302307
return i;

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/PySequenceArrayWrapperMR.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,13 @@ abstract static class WriteArrayItemNode extends Node {
235235

236236
public abstract Object execute(Object arrayObject, Object idx, Object value);
237237

238+
@Specialization
239+
Object doTuple(PBytes s, long idx, byte value,
240+
@Cached("create()") SequenceStorageNodes.SetItemNode setItemNode) {
241+
setItemNode.executeLong(s.getSequenceStorage(), idx, value);
242+
return value;
243+
}
244+
238245
@Specialization
239246
Object doTuple(PSequence s, long idx, Object value,
240247
@Cached("create()") SequenceStorageNodes.SetItemNode setItemNode) {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/common/SequenceStorageNodes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,9 +471,9 @@ public SetItemNode(NormalizeIndexNode normalizeIndexNode) {
471471

472472
public abstract void execute(SequenceStorage s, Object key, Object value);
473473

474-
public abstract void execute(SequenceStorage s, int key, Object value);
474+
public abstract void executeInt(SequenceStorage s, int key, Object value);
475475

476-
public abstract void execute(SequenceStorage s, long key, Object value);
476+
public abstract void executeLong(SequenceStorage s, long key, Object value);
477477

478478
@Specialization
479479
protected void doScalarInt(SequenceStorage storage, int idx, Object value) {

0 commit comments

Comments
 (0)