@@ -84,35 +84,25 @@ public final PFrame execute(boolean markAsEscaped, boolean forceSync, Frame fram
84
84
PFrame .Reference info = PArguments .getCurrentFrameInfo (frameToMaterialize );
85
85
assert info != null && info .getCallNode () != null : "cannot materialize a frame without location information" ;
86
86
Node callNode = info .getCallNode ();
87
- return execute (callNode , markAsEscaped , forceSync , false , frameToMaterialize );
87
+ return execute (callNode , markAsEscaped , forceSync , frameToMaterialize );
88
88
}
89
89
90
90
public final PFrame execute (Frame frame , boolean markAsEscaped ) {
91
91
return execute (markAsEscaped , frame );
92
92
}
93
93
94
94
public final PFrame execute (Frame frame , Node location , boolean markAsEscaped , boolean forceSync ) {
95
- return execute (frame , location , markAsEscaped , forceSync , false );
95
+ return execute (location , markAsEscaped , forceSync , frame );
96
96
}
97
97
98
- public final PFrame execute (Frame frame , Node location , boolean markAsEscaped , boolean forceSync , boolean updateLocationIfMissing ) {
99
- return execute (location , markAsEscaped , forceSync , updateLocationIfMissing , frame );
100
- }
101
-
102
- public final PFrame execute (Node location , boolean markAsEscaped , boolean forceSync , Frame frameToMaterialize ) {
103
- return execute (location , markAsEscaped , forceSync , false , frameToMaterialize );
104
- }
105
-
106
- // TODO remove frame? remove location? remove updateLocationIfMissing?
107
- public abstract PFrame execute (Node location , boolean markAsEscaped , boolean forceSync , boolean updateLocationIfMissing , Frame frameToMaterialize );
98
+ public abstract PFrame execute (Node location , boolean markAsEscaped , boolean forceSync , Frame frameToMaterialize );
108
99
109
100
@ Specialization (guards = {
110
101
"cachedFD == frameToMaterialize.getFrameDescriptor()" , //
111
102
"getPFrame(frameToMaterialize) == null" , //
112
103
"!hasGeneratorFrame(frameToMaterialize)" , //
113
104
"!hasCustomLocals(frameToMaterialize)" }, limit = "1" )
114
- static PFrame freshPFrameCachedFD (Node location , boolean markAsEscaped , boolean forceSync ,
115
- @ SuppressWarnings ("unused" ) boolean updateLocationIfMissing , Frame frameToMaterialize ,
105
+ static PFrame freshPFrameCachedFD (Node location , boolean markAsEscaped , boolean forceSync , Frame frameToMaterialize ,
116
106
@ Cached (value = "frameToMaterialize.getFrameDescriptor()" ) FrameDescriptor cachedFD ,
117
107
@ Shared ("factory" ) @ Cached PythonObjectFactory factory ,
118
108
@ Shared ("syncValuesNode" ) @ Cached SyncFrameValuesNode syncValuesNode ) {
@@ -122,7 +112,7 @@ static PFrame freshPFrameCachedFD(Node location, boolean markAsEscaped, boolean
122
112
}
123
113
124
114
@ Specialization (guards = {"getPFrame(frameToMaterialize) == null" , "!hasGeneratorFrame(frameToMaterialize)" , "!hasCustomLocals(frameToMaterialize)" }, replaces = "freshPFrameCachedFD" )
125
- static PFrame freshPFrame (Node location , boolean markAsEscaped , boolean forceSync , @ SuppressWarnings ( "unused" ) boolean updateLocationIfMissing , Frame frameToMaterialize ,
115
+ static PFrame freshPFrame (Node location , boolean markAsEscaped , boolean forceSync , Frame frameToMaterialize ,
126
116
@ Shared ("factory" ) @ Cached PythonObjectFactory factory ,
127
117
@ Shared ("syncValuesNode" ) @ Cached SyncFrameValuesNode syncValuesNode ) {
128
118
MaterializedFrame locals = createLocalsFrame (frameToMaterialize .getFrameDescriptor ());
@@ -131,7 +121,7 @@ static PFrame freshPFrame(Node location, boolean markAsEscaped, boolean forceSyn
131
121
}
132
122
133
123
@ Specialization (guards = {"getPFrame(frameToMaterialize) == null" , "!hasGeneratorFrame(frameToMaterialize)" , "hasCustomLocals(frameToMaterialize)" })
134
- static PFrame freshPFrameCusstomLocals (Node location , boolean markAsEscaped , @ SuppressWarnings ("unused" ) boolean forceSync , @ SuppressWarnings ( "unused" ) boolean updateLocationIfMissing ,
124
+ static PFrame freshPFrameCusstomLocals (Node location , boolean markAsEscaped , @ SuppressWarnings ("unused" ) boolean forceSync ,
135
125
Frame frameToMaterialize ,
136
126
@ Shared ("factory" ) @ Cached PythonObjectFactory factory ) {
137
127
PFrame escapedFrame = factory .createPFrame (PArguments .getCurrentFrameInfo (frameToMaterialize ), location , null );
@@ -140,8 +130,7 @@ static PFrame freshPFrameCusstomLocals(Node location, boolean markAsEscaped, @Su
140
130
}
141
131
142
132
@ Specialization (guards = {"getPFrame(frameToMaterialize) == null" , "hasGeneratorFrame(frameToMaterialize)" })
143
- static PFrame freshPFrameForGenerator (Node location , @ SuppressWarnings ("unused" ) boolean markAsEscaped , @ SuppressWarnings ("unused" ) boolean forceSync ,
144
- @ SuppressWarnings ("unused" ) boolean updateLocationIfMissing , Frame frameToMaterialize ,
133
+ static PFrame freshPFrameForGenerator (Node location , @ SuppressWarnings ("unused" ) boolean markAsEscaped , @ SuppressWarnings ("unused" ) boolean forceSync , Frame frameToMaterialize ,
145
134
@ Shared ("factory" ) @ Cached PythonObjectFactory factory ) {
146
135
MaterializedFrame generatorFrame = PArguments .getGeneratorFrame (frameToMaterialize );
147
136
PFrame .Reference frameRef = PArguments .getCurrentFrameInfo (frameToMaterialize );
@@ -151,7 +140,7 @@ static PFrame freshPFrameForGenerator(Node location, @SuppressWarnings("unused")
151
140
}
152
141
153
142
@ Specialization (guards = "getPFrame(frameToMaterialize) != null" )
154
- static PFrame alreadyEscapedFrame (Node location , boolean markAsEscaped , boolean forceSync , boolean updateLocationIfMissing , Frame frameToMaterialize ,
143
+ static PFrame alreadyEscapedFrame (@ SuppressWarnings ( "unused" ) Node location , boolean markAsEscaped , boolean forceSync , Frame frameToMaterialize ,
155
144
@ Shared ("syncValuesNode" ) @ Cached SyncFrameValuesNode syncValuesNode ,
156
145
@ Cached ConditionProfile syncProfile ) {
157
146
PFrame pyFrame = getPFrame (frameToMaterialize );
@@ -161,10 +150,6 @@ static PFrame alreadyEscapedFrame(Node location, boolean markAsEscaped, boolean
161
150
if (markAsEscaped ) {
162
151
pyFrame .getRef ().markAsEscaped ();
163
152
}
164
- if (!updateLocationIfMissing || pyFrame .getLocation () == null ) {
165
- // update the location so the line number is correct
166
- pyFrame .setLocation (location );
167
- }
168
153
processBytecodeFrame (frameToMaterialize , pyFrame );
169
154
return pyFrame ;
170
155
}
0 commit comments