[SERVER-72078] Add jmpNotNothing vm instruction Created: 13/Dec/22  Updated: 29/Oct/23  Resolved: 25/Jan/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.3.0-rc0

Type: Task Priority: Major - P3
Reporter: Zixuan Zhuang Assignee: Rui Liu
Resolution: Fixed Votes: 0
Labels: pm2697-m2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-71494 Add jmpFalse vm instruction Closed
Assigned Teams:
Query Execution
Backwards Compatibility: Fully Compatible
Sprint: QE 2023-01-09, QE 2023-01-23, QE 2023-02-06
Participants:
Story Points: 3

 Description   

        // For now:
        //   lhs
        //   if peek() is nothing then goto nothingCase
        // existsCase:
        //   goto done
        // nothingCase:
        //   pop   // drop lhs
        //   rhs
        // done:        
        
        // TODO if we had a jmpNotNothing (exactly like jmpNothing but with the condition reversed)
        // we could avoid jumping over a jump here:
        //   lhs
        //   if peek() is not nothing then goto done
        //   pop   // drop lhs
        //   rhs
        // done: 

Add jmpNotNothing vm instruction can avoid a jmp instruction for fillEmpty



 Comments   
Comment by Githook User [ 25/Jan/23 ]

Author:

{'name': 'Rui Liu', 'email': 'lriuui0x0@gmail.com', 'username': 'lriuui0x0'}

Message: SERVER-72078 Add jmpNotNothing instruction
Branch: master
https://github.com/mongodb/mongo/commit/4d08380822ed0ba128a4689a0a381c1df4641f84

Generated at Thu Feb 08 06:20:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.