mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Delay definition of pc_moved_p
to unify the duplicated declarations and to make sure it's not used until set properly. Also changed it from legacy TRUE/FALSE to stdbool.
This commit is contained in:
		
							parent
							
								
									928bb17770
								
							
						
					
					
						commit
						3194cd36e2
					
				
					 3 changed files with 2 additions and 3 deletions
				
			
		|  | @ -7,7 +7,6 @@ | |||
| % # details. | ||||
|     fprintf(f, "{\n"); | ||||
|     { | ||||
|         MAYBE_UNUSED(int pc_moved_p) = FALSE; | ||||
| % # compiler: Prepare operands which may be used by `insn.call_attribute` | ||||
| % insn.opes.each_with_index do |ope, i| | ||||
|         MAYBE_UNUSED(<%= ope.fetch(:decl) %>) = (<%= ope.fetch(:type) %>)operands[<%= i %>]; | ||||
|  |  | |||
|  | @ -6,9 +6,10 @@ | |||
| % # details. | ||||
| % | ||||
| % # JIT: Move pc for catch table on catch_except_p, and for #caller_locations and rb_profile_frames on !insn.always_leaf? | ||||
|         MAYBE_UNUSED(bool pc_moved_p) = false; | ||||
|         if (body->catch_except_p || <%= insn.always_leaf? ? 'FALSE' : 'TRUE' %>) { | ||||
|             fprintf(f, "    reg_cfp->pc = original_body_iseq + %d;\n", next_pos); /* ADD_PC(INSN_ATTR(width)); */ | ||||
|             pc_moved_p = TRUE; | ||||
|             pc_moved_p = true; | ||||
|         } | ||||
| % | ||||
| % # JIT: move sp to use or preserve stack variables | ||||
|  |  | |||
|  | @ -8,7 +8,6 @@ | |||
| % | ||||
| % # Optimized case of send / opt_send_without_block instructions. | ||||
| { | ||||
|     MAYBE_UNUSED(int pc_moved_p) = FALSE; | ||||
| % # compiler: Prepare operands which may be used by `insn.call_attribute` | ||||
| % insn.opes.each_with_index do |ope, i| | ||||
|     MAYBE_UNUSED(<%= ope.fetch(:decl) %>) = (<%= ope.fetch(:type) %>)operands[<%= i %>]; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Takashi Kokubun
						Takashi Kokubun