docs(tvix/eval): add doc comment on compiler::patch_jump
				
					
				
			Change-Id: Ifdd7b99223d239d955ac7eeeae95db97eb742bf0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6276 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
This commit is contained in:
		
							parent
							
								
									bc9351f811
								
							
						
					
					
						commit
						903b57be04
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -859,6 +859,12 @@ impl Compiler {
 | 
			
		|||
        self.emit_constant(Value::String(ident.ident_token().unwrap().text().into()));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /// Patch the jump instruction at the given index, setting its
 | 
			
		||||
    /// jump offset from the placeholder to the current code position.
 | 
			
		||||
    ///
 | 
			
		||||
    /// This is required because the actual target offset of jumps is
 | 
			
		||||
    /// not known at the time when the jump operation itself is
 | 
			
		||||
    /// emitted.
 | 
			
		||||
    fn patch_jump(&mut self, idx: CodeIdx) {
 | 
			
		||||
        let offset = self.chunk().code.len() - 1 - idx.0;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue