1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-02 05:54:29 +03:00

Remove the peep-hole optimization of removing OP_Close opcodes that come

before OP_Halt, as the extra work of removing those opcodes uses more cycles
than just running them.

FossilOrigin-Name: 984a96d79656c1b095aba1f88aca4bb787ba0bd8
This commit is contained in:
drh
2016-09-29 19:50:02 +00:00
parent 42735c7d30
commit 2831c4d123
5 changed files with 10 additions and 14 deletions

View File

@@ -374,7 +374,6 @@ void sqlite3VdbeResolveLabel(Vdbe *v, int x){
if( p->aLabel ){
p->aLabel[j] = v->nOp;
}
p->iFixedOp = v->nOp - 1;
}
/*
@@ -773,7 +772,6 @@ void sqlite3VdbeChangeP5(Vdbe *p, u8 p5){
** the address of the next instruction to be coded.
*/
void sqlite3VdbeJumpHere(Vdbe *p, int addr){
p->pParse->iFixedOp = p->nOp - 1;
sqlite3VdbeChangeP2(p, addr, p->nOp);
}
@@ -896,7 +894,7 @@ int sqlite3VdbeChangeToNoop(Vdbe *p, int addr){
** then remove it. Return true if and only if an opcode was removed.
*/
int sqlite3VdbeDeletePriorOpcode(Vdbe *p, u8 op){
if( (p->nOp-1)>(p->pParse->iFixedOp) && p->aOp[p->nOp-1].opcode==op ){
if( p->nOp>0 && p->aOp[p->nOp-1].opcode==op ){
return sqlite3VdbeChangeToNoop(p, p->nOp-1);
}else{
return 0;