Skip to content

Commit c5ca122

Browse files
committed
no longer copy the frame descriptor
1 parent 4255de9 commit c5ca122

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/function/FunctionRootNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public FrameSlot[] getCellVarSlots() {
119119

120120
@Override
121121
public FunctionRootNode copy() {
122-
return new FunctionRootNode(getLanguage(PythonLanguage.class), getSourceSection(), functionName, isGenerator, getFrameDescriptor().shallowCopy(), uninitializedBody, executionCellSlots);
122+
return new FunctionRootNode(getLanguage(PythonLanguage.class), getSourceSection(), functionName, isGenerator, getFrameDescriptor(), uninitializedBody, executionCellSlots);
123123
}
124124

125125
@ExplodeLoop

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/generator/FrameTransferNode.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,47 +61,41 @@ public Object doWrite(VirtualFrame frame, Object value) {
6161
@Specialization(guards = "isBooleanKind(frame)")
6262
public boolean write(VirtualFrame frame, boolean right) {
6363
Frame cargoFrame = PArguments.getGeneratorFrame(frame);
64-
assert frameSlot.getFrameDescriptor() == cargoFrame.getFrameDescriptor();
6564
cargoFrame.setBoolean(frameSlot, right);
6665
return right;
6766
}
6867

6968
@Specialization(guards = "isIntegerKind(frame)")
7069
public int doInteger(VirtualFrame frame, int value) {
7170
Frame cargoFrame = PArguments.getGeneratorFrame(frame);
72-
assert frameSlot.getFrameDescriptor() == cargoFrame.getFrameDescriptor();
7371
cargoFrame.setInt(frameSlot, value);
7472
return value;
7573
}
7674

7775
@Specialization(guards = "isIntOrObjectKind(frame)")
7876
public PInt write(VirtualFrame frame, PInt value) {
7977
Frame cargoFrame = PArguments.getGeneratorFrame(frame);
80-
assert frameSlot.getFrameDescriptor() == cargoFrame.getFrameDescriptor();
8178
setObject(cargoFrame, value);
8279
return value;
8380
}
8481

8582
@Specialization(guards = "isLongKind(frame)")
8683
public long doLong(VirtualFrame frame, long value) {
8784
Frame cargoFrame = PArguments.getGeneratorFrame(frame);
88-
assert frameSlot.getFrameDescriptor() == cargoFrame.getFrameDescriptor();
8985
cargoFrame.setLong(frameSlot, value);
9086
return value;
9187
}
9288

9389
@Specialization(guards = "isDoubleKind(frame)")
9490
public double doDouble(VirtualFrame frame, double right) {
9591
Frame cargoFrame = PArguments.getGeneratorFrame(frame);
96-
assert frameSlot.getFrameDescriptor() == cargoFrame.getFrameDescriptor();
9792
cargoFrame.setDouble(frameSlot, right);
9893
return right;
9994
}
10095

10196
@Specialization(guards = "isObjectKind(frame)")
10297
public Object write(VirtualFrame frame, Object right) {
10398
Frame cargoFrame = PArguments.getGeneratorFrame(frame);
104-
assert frameSlot.getFrameDescriptor() == cargoFrame.getFrameDescriptor();
10599
assert !(right instanceof PInt);
106100
setObject(cargoFrame, right);
107101
return right;

0 commit comments

Comments
 (0)