do not generate interface tables for unused interfaces
							parent
							
								
									be4eaa680a
								
							
						
					
					
						commit
						f33d8bd596
					
				| 
						 | 
					@ -397,6 +397,7 @@ fn (v &V) interface_table() string {
 | 
				
			||||||
                       continue
 | 
					                       continue
 | 
				
			||||||
               }
 | 
					               }
 | 
				
			||||||
               mut methods := ''
 | 
					               mut methods := ''
 | 
				
			||||||
 | 
					              sb.writeln('// NR methods = $t.gen_types.len')
 | 
				
			||||||
               for i, gen_type in t.gen_types {
 | 
					               for i, gen_type in t.gen_types {
 | 
				
			||||||
                       methods += '{'
 | 
					                       methods += '{'
 | 
				
			||||||
                       for i, method in t.methods {
 | 
					                       for i, method in t.methods {
 | 
				
			||||||
| 
						 | 
					@ -410,11 +411,12 @@ fn (v &V) interface_table() string {
 | 
				
			||||||
                       // Speaker_Cat_index = 0
 | 
					                       // Speaker_Cat_index = 0
 | 
				
			||||||
                       sb.writeln('int _${t.name}_${gen_type}_index = $i;')
 | 
					                       sb.writeln('int _${t.name}_${gen_type}_index = $i;')
 | 
				
			||||||
               }
 | 
					               }
 | 
				
			||||||
              if t.methods.len == 0 {
 | 
					              if t.gen_types.len > 0 {
 | 
				
			||||||
              	methods = '{TCCSKIP(0)}'
 | 
					//              	methods = '{TCCSKIP(0)}'
 | 
				
			||||||
              }	
 | 
					//              }	
 | 
				
			||||||
               sb.writeln('void* (* ${t.name}_name_table[][$t.methods.len]) = ' +
 | 
					               sb.writeln('void* (* ${t.name}_name_table[][$t.methods.len]) = ' +
 | 
				
			||||||
'{ $methods }; ')
 | 
					'{ $methods }; ')
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
               continue
 | 
					               continue
 | 
				
			||||||
       }
 | 
					       }
 | 
				
			||||||
       return sb.str()
 | 
					       return sb.str()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -653,6 +653,7 @@ pub fn (v &V)  get_user_files() []string {
 | 
				
			||||||
	mut user_files := []string
 | 
						mut user_files := []string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if v.pref.is_test {
 | 
						if v.pref.is_test {
 | 
				
			||||||
 | 
							// TODO this somtimes fails on CI
 | 
				
			||||||
		user_files << filepath.join(v.vroot,'vlib','compiler','preludes','tests_assertions.v')
 | 
							user_files << filepath.join(v.vroot,'vlib','compiler','preludes','tests_assertions.v')
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue