* Evaluate SubscriptingRef fetch for an array slice. * * Source container is in step's result variable (it's known not NULL, since * we set fetch_strict to true), and indexes have already been evaluated into * workspace array. */
| 261 | * workspace array. |
| 262 | */ |
| 263 | static void |
| 264 | array_subscript_fetch_slice(ExprState *state, |
| 265 | ExprEvalStep *op, |
| 266 | ExprContext *econtext) |
| 267 | { |
| 268 | SubscriptingRefState *sbsrefstate = op->d.sbsref.state; |
| 269 | ArraySubWorkspace *workspace = (ArraySubWorkspace *) sbsrefstate->workspace; |
| 270 | |
| 271 | /* Should not get here if source array (or any subscript) is null */ |
| 272 | Assert(!(*op->resnull)); |
| 273 | |
| 274 | *op->resvalue = array_get_slice(*op->resvalue, |
| 275 | sbsrefstate->numupper, |
| 276 | workspace->upperindex, |
| 277 | workspace->lowerindex, |
| 278 | sbsrefstate->upperprovided, |
| 279 | sbsrefstate->lowerprovided, |
| 280 | workspace->refattrlength, |
| 281 | workspace->refelemlength, |
| 282 | workspace->refelembyval, |
| 283 | workspace->refelemalign); |
| 284 | /* The slice is never NULL, so no need to change *op->resnull */ |
| 285 | } |
| 286 | |
| 287 | /* |
| 288 | * Evaluate SubscriptingRef assignment for an array element assignment. |
nothing calls this directly
no test coverage detected