1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Use the newer OP_BeginSubrtn opcode instead of OP_Integer to start the

subroutine used to matrialize a view.  This does not change execution but
does make the byte code a little easier to read.

FossilOrigin-Name: cebd4fd606f967de527cff79df8e80e16d06eec257939322f16d21303868fb4d
This commit is contained in:
drh
2022-05-21 15:12:41 +00:00
parent 4257373f6d
commit b800bd63aa
3 changed files with 14 additions and 11 deletions

View File

@@ -6966,7 +6966,7 @@ int sqlite3Select(
int retAddr;
pItem->regReturn = ++pParse->nMem;
topAddr = sqlite3VdbeAddOp2(v, OP_Integer, 0, pItem->regReturn);
topAddr = sqlite3VdbeAddOp2(v, OP_BeginSubrtn, 0, pItem->regReturn);
pItem->addrFillSub = topAddr+1;
if( pItem->fg.isCorrelated==0 ){
/* If the subquery is not correlated and if we are not inside of
@@ -6982,7 +6982,7 @@ int sqlite3Select(
sqlite3Select(pParse, pSub, &dest);
pItem->pTab->nRowLogEst = pSub->nSelectRow;
if( onceAddr ) sqlite3VdbeJumpHere(v, onceAddr);
retAddr = sqlite3VdbeAddOp1(v, OP_Return, pItem->regReturn);
retAddr = sqlite3VdbeAddOp3(v, OP_Return, pItem->regReturn, topAddr+1, 1);
VdbeComment((v, "end %!S", pItem));
sqlite3VdbeChangeP1(v, topAddr, retAddr);
sqlite3ClearTempRegCache(pParse);