compiler: don't try to get pointer methods
I don't know why this was ever needed, but it seems to be incorrect and unnecessary.
Этот коммит содержится в:
		
							родитель
							
								
									0f83c3b3c6
								
							
						
					
					
						коммит
						30ac6ec281
					
				
					 1 изменённых файлов: 3 добавлений и 12 удалений
				
			
		
							
								
								
									
										15
									
								
								compiler.go
									
										
									
									
									
								
							
							
						
						
									
										15
									
								
								compiler.go
									
										
									
									
									
								
							|  | @ -721,22 +721,13 @@ func (c *Compiler) getDIType(typ types.Type) (llvm.Metadata, error) { | |||
| 	} | ||||
| } | ||||
| 
 | ||||
| // Get all methods of a type: both value receivers and pointer receivers. | ||||
| // Get all methods of a type. | ||||
| func getAllMethods(prog *ssa.Program, typ types.Type) []*types.Selection { | ||||
| 	var methods []*types.Selection | ||||
| 
 | ||||
| 	// value receivers | ||||
| 	ms := prog.MethodSets.MethodSet(typ) | ||||
| 	methods := make([]*types.Selection, ms.Len()) | ||||
| 	for i := 0; i < ms.Len(); i++ { | ||||
| 		methods = append(methods, ms.At(i)) | ||||
| 		methods[i] = ms.At(i) | ||||
| 	} | ||||
| 
 | ||||
| 	// pointer receivers | ||||
| 	ms = prog.MethodSets.MethodSet(types.NewPointer(typ)) | ||||
| 	for i := 0; i < ms.Len(); i++ { | ||||
| 		methods = append(methods, ms.At(i)) | ||||
| 	} | ||||
| 
 | ||||
| 	return methods | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Загрузка…
	
	Создание таблицы
		
		Сослаться в новой задаче
	
	 Ayke van Laethem
						Ayke van Laethem