Skip to content

Commit 513a262

Browse files
committed
[GR-21590] Update imports
PullRequest: graalpython/2423
2 parents cec8a16 + 228b2f3 commit 513a262

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

ci.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "overlay": "55b5a0614a8d46864bb0197b92d2e20033e58ed7" }
1+
{ "overlay": "2cd069137637587d926bf791fd2003912df2368b" }

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/bytecode/FrameInfo.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ public PBytecodeRootNode getRootNode() {
5959
return rootNode;
6060
}
6161

62-
public int bciToLine(int bci) {
63-
return rootNode.bciToLine(bci);
64-
}
65-
6662
public int getBci(Frame frame) {
67-
return frame.getIntStatic(rootNode.bcioffset);
63+
if (frame.isInt(rootNode.bcioffset)) {
64+
return frame.getInt(rootNode.bcioffset);
65+
} else {
66+
return -1;
67+
}
6868
}
6969

7070
public Object getYieldFrom(Frame generatorFrame, int bci, int stackTop) {
@@ -76,10 +76,6 @@ public Object getYieldFrom(Frame generatorFrame, int bci, int stackTop) {
7676
return null;
7777
}
7878

79-
public int getLineno(Frame frame) {
80-
return bciToLine(getBci(frame));
81-
}
82-
8379
public int getVariableCount() {
8480
CodeUnit code = rootNode.getCodeUnit();
8581
return code.varnames.length + code.cellvars.length + code.freevars.length;

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/bytecode/PBytecodeRootNode.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,8 @@ private static FrameDescriptor makeFrameDescriptor(CodeUnit co, FrameInfo info)
542542
// stack
543543
newBuilder.addSlots(co.stacksize, FrameSlotKind.Illegal);
544544
// BCI filled when unwinding the stack or when pausing generators
545-
newBuilder.addSlot(FrameSlotKind.Static, null, null);
545+
// TODO we should use a static slot when GR-40849 and GR-40742 are fixed
546+
newBuilder.addSlot(FrameSlotKind.Int, null, null);
546547
if (co.isGeneratorOrCoroutine()) {
547548
// stackTop saved when pausing a generator
548549
newBuilder.addSlot(FrameSlotKind.Int, null, null);
@@ -2443,7 +2444,7 @@ private void unboxVariables(Frame localFrame) {
24432444
}
24442445

24452446
private static void setCurrentBci(VirtualFrame virtualFrame, int bciSlot, int bci) {
2446-
virtualFrame.setIntStatic(bciSlot, bci);
2447+
virtualFrame.setInt(bciSlot, bci);
24472448
}
24482449

24492450
private boolean bytecodePopCondition(VirtualFrame virtualFrame, int stackTop, Node[] localNodes, int bci, boolean useCachedNodes) {

mx.graalpython/suite.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,23 @@
4444
},
4545
{
4646
"name": "tools",
47-
"version": "35137ce8c2a604b2b2c7de6c3333052432234e25",
47+
"version": "96d195f5bf3e3c6953f8823e47b7f73d2c04dba8",
4848
"subdir": True,
4949
"urls": [
5050
{"url": "https://github.com/oracle/graal", "kind": "git"},
5151
],
5252
},
5353
{
5454
"name": "sulong",
55-
"version": "35137ce8c2a604b2b2c7de6c3333052432234e25",
55+
"version": "96d195f5bf3e3c6953f8823e47b7f73d2c04dba8",
5656
"subdir": True,
5757
"urls": [
5858
{"url": "https://github.com/oracle/graal", "kind": "git"},
5959
]
6060
},
6161
{
6262
"name": "regex",
63-
"version": "35137ce8c2a604b2b2c7de6c3333052432234e25",
63+
"version": "96d195f5bf3e3c6953f8823e47b7f73d2c04dba8",
6464
"subdir": True,
6565
"urls": [
6666
{"url": "https://github.com/oracle/graal", "kind": "git"},

0 commit comments

Comments
 (0)