mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	One last tweak to the tracing machinery: this actually computes what I intended
all along. Before instr_lb tended to be too high. I don't think this actually makes any difference, given what the compiler produces, but it makes me a bit happier.
This commit is contained in:
		
							parent
							
								
									3ae3315f44
								
							
						
					
					
						commit
						ca803a0dd7
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -2966,15 +2966,17 @@ maybe_call_line_trace(int opcode, Py_tracefunc func, PyObject *obj, | |||
| 			if (addr + *p > frame->f_lasti) | ||||
| 				break; | ||||
| 			addr += *p++; | ||||
| 			if (*p) *instr_lb = addr; | ||||
| 			line += *p++; | ||||
| 			--size; | ||||
| 		} | ||||
| 
 | ||||
| 		if (addr == frame->f_lasti) { | ||||
| 			frame->f_lineno = line; | ||||
| 			call_trace(func, obj, frame,  | ||||
| 				   PyTrace_LINE, Py_None); | ||||
| 		} | ||||
| 		*instr_lb = addr; | ||||
| 
 | ||||
| 		if (size > 0) { | ||||
| 			while (--size >= 0) { | ||||
| 				addr += *p++; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Michael W. Hudson
						Michael W. Hudson