compiler: fix interface lowering pass
It was removing some globals that still had uses left.
Этот коммит содержится в:
		
							родитель
							
								
									7de3d4be2b
								
							
						
					
					
						коммит
						7bcabe53ca
					
				
					 1 изменённых файлов: 7 добавлений и 1 удалений
				
			
		|  | @ -440,12 +440,18 @@ func (p *lowerInterfacesPass) run() { | |||
| 	// numbers. | ||||
| 	for _, typ := range p.types { | ||||
| 		for _, use := range getUses(typ.typecode) { | ||||
| 			if use.IsConstant() && use.Opcode() == llvm.PtrToInt { | ||||
| 			if !use.IsAConstantExpr().IsNil() && use.Opcode() == llvm.PtrToInt { | ||||
| 				use.ReplaceAllUsesWith(llvm.ConstInt(p.uintptrType, typ.num, false)) | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	// Remove stray runtime.typeInInterface globals. Required for the following | ||||
| 	// cleanup. | ||||
| 	for _, global := range typesInInterfaces { | ||||
| 		global.EraseFromParentAsGlobal() | ||||
| 	} | ||||
| 
 | ||||
| 	// Remove method sets of types. Unnecessary, but cleans up the IR for | ||||
| 	// inspection. | ||||
| 	for _, typ := range p.types { | ||||
|  |  | |||
		Загрузка…
	
	Создание таблицы
		
		Сослаться в новой задаче
	
	 Ayke van Laethem
						Ayke van Laethem