mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	remove redundant NULL checks after RUBY_VM_IFUNC_P
* proc.c (proc_mark): remove redundant check * vm.c (env_mark): ditto This doesn't change object code size, but the unstripped executable is smaller and the code less confusing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									a0908cb413
								
							
						
					
					
						commit
						dab4d077d1
					
				
					 3 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,8 @@
 | 
			
		|||
Wed Jul 15 18:31:18 2015  Eric Wong  <e@80x24.org>
 | 
			
		||||
 | 
			
		||||
	* proc.c (proc_mark): remove redundant check
 | 
			
		||||
	* vm.c (env_mark): ditto
 | 
			
		||||
 | 
			
		||||
Wed Jul 15 17:27:40 2015  Eric Wong  <e@80x24.org>
 | 
			
		||||
 | 
			
		||||
	* iseq.c (iseq_mark): remove check for data pointer
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								proc.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								proc.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -50,7 +50,7 @@ proc_mark(void *ptr)
 | 
			
		|||
    RUBY_MARK_UNLESS_NULL(proc->block.self);
 | 
			
		||||
    RUBY_MARK_UNLESS_NULL(rb_vm_proc_envval(proc));
 | 
			
		||||
    if (proc->block.iseq && RUBY_VM_IFUNC_P(proc->block.iseq)) {
 | 
			
		||||
	RUBY_MARK_UNLESS_NULL((VALUE)(proc->block.iseq));
 | 
			
		||||
	rb_gc_mark((VALUE)(proc->block.iseq));
 | 
			
		||||
    }
 | 
			
		||||
    RUBY_MARK_LEAVE("proc");
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								vm.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								vm.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -422,7 +422,7 @@ env_mark(void * const ptr)
 | 
			
		|||
 | 
			
		||||
    if (env->block.iseq) {
 | 
			
		||||
	if (RUBY_VM_IFUNC_P(env->block.iseq)) {
 | 
			
		||||
	    RUBY_MARK_UNLESS_NULL((VALUE)env->block.iseq);
 | 
			
		||||
	    rb_gc_mark((VALUE)env->block.iseq);
 | 
			
		||||
	}
 | 
			
		||||
	else {
 | 
			
		||||
	    RUBY_MARK_UNLESS_NULL(env->block.iseq->self);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue