mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	treat PC for gc events
ADD_PCs moved. That didn't change vast majority of event hooks because vm_traece() has been placed before ADD_PC. However for GC events the situation is different. We have to take care. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									3234245ae3
								
							
						
					
					
						commit
						6b61e99e08
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		
							
								
								
									
										3
									
								
								gc.c
									
										
									
									
									
								
							
							
						
						
									
										3
									
								
								gc.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1819,7 +1819,10 @@ rb_objspace_set_event_hook(const rb_event_flag_t event)
 | 
			
		|||
static void
 | 
			
		||||
gc_event_hook_body(rb_execution_context_t *ec, rb_objspace_t *objspace, const rb_event_flag_t event, VALUE data)
 | 
			
		||||
{
 | 
			
		||||
    /* increment PC because source line is calculated with PC-1 */
 | 
			
		||||
    ec->cfp->pc++;
 | 
			
		||||
    EXEC_EVENT_HOOK(ec, event, ec->cfp->self, 0, 0, 0, data);
 | 
			
		||||
    ec->cfp->pc--;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#define gc_event_hook_available_p(objspace) ((objspace)->flags.has_hook)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue