Skip to content

Commit 7414834

Browse files
committed
Add missing Node#insert and prefer its array overload
1 parent 8080255 commit 7414834

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/BuiltinConstructors.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2021, Oracle and/or its affiliates.
2+
* Copyright (c) 2017, 2022, Oracle and/or its affiliates.
33
* Copyright (c) 2013, Regents of the University of California
44
*
55
* All rights reserved.
@@ -173,8 +173,8 @@
173173
import com.oracle.graal.python.builtins.objects.type.PythonClass;
174174
import com.oracle.graal.python.builtins.objects.type.PythonManagedClass;
175175
import com.oracle.graal.python.builtins.objects.type.SpecialMethodSlot;
176-
import com.oracle.graal.python.builtins.objects.type.TypeFlags;
177176
import com.oracle.graal.python.builtins.objects.type.TypeBuiltins;
177+
import com.oracle.graal.python.builtins.objects.type.TypeFlags;
178178
import com.oracle.graal.python.builtins.objects.type.TypeNodes;
179179
import com.oracle.graal.python.builtins.objects.type.TypeNodes.GetBestBaseClassNode;
180180
import com.oracle.graal.python.builtins.objects.type.TypeNodes.GetItemsizeNode;
@@ -1626,10 +1626,11 @@ private Object callNativeGenericNewNode(Object self, Object[] varargs, PKeyword[
16261626
}
16271627
if (toSulongNodes == null) {
16281628
CompilerDirectives.transferToInterpreterAndInvalidate();
1629-
toSulongNodes = new CExtNodes.ToSulongNode[4];
1630-
for (int i = 0; i < toSulongNodes.length; i++) {
1631-
toSulongNodes[i] = insert(CExtNodesFactory.ToSulongNodeGen.create());
1629+
CExtNodes.ToSulongNode[] newToSulongNodes = new CExtNodes.ToSulongNode[4];
1630+
for (int i = 0; i < newToSulongNodes.length; i++) {
1631+
newToSulongNodes[i] = CExtNodesFactory.ToSulongNodeGen.create();
16321632
}
1633+
toSulongNodes = insert(newToSulongNodes);
16331634
}
16341635
if (asPythonObjectNode == null) {
16351636
CompilerDirectives.transferToInterpreterAndInvalidate();

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/superobject/SuperBuiltins.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2022, 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
@@ -312,7 +312,7 @@ private Object getClassFromTarget(VirtualFrame frame, PFrame target, HashingStor
312312
private CellBuiltins.GetRefNode getGetRefNode() {
313313
if (getRefNode == null) {
314314
CompilerDirectives.transferToInterpreterAndInvalidate();
315-
getRefNode = CellBuiltins.GetRefNode.create();
315+
getRefNode = insert(CellBuiltins.GetRefNode.create());
316316
}
317317
return getRefNode;
318318
}

0 commit comments

Comments
 (0)