From cb8fa3e1f602a7f34f77d767ef414c0e167cfe7c Mon Sep 17 00:00:00 2001 From: Petr Date: Wed, 18 Dec 2024 21:19:22 +0100 Subject: [PATCH] ftms --- src/Compiler/Driver/CompilerImports.fsi | 2 +- src/Compiler/Driver/fsc.fs | 64 ++++++++++++------------- src/Compiler/Driver/fsc.fsi | 2 +- src/Compiler/TypedTree/TypedTree.fsi | 11 ++--- 4 files changed, 39 insertions(+), 40 deletions(-) diff --git a/src/Compiler/Driver/CompilerImports.fsi b/src/Compiler/Driver/CompilerImports.fsi index a401312c757..aa885a7b705 100644 --- a/src/Compiler/Driver/CompilerImports.fsi +++ b/src/Compiler/Driver/CompilerImports.fsi @@ -85,7 +85,7 @@ val EncodeTypecheckingData: tcGlobals: TcGlobals * generatedCcu: CcuThunk * outfile: string * - isIncrementalBuild: bool * + isIncrementalBuild: bool * tcInfo: PickledTcInfo -> ILResource list diff --git a/src/Compiler/Driver/fsc.fs b/src/Compiler/Driver/fsc.fs index 6d2a5ec580f..7afbc218b61 100644 --- a/src/Compiler/Driver/fsc.fs +++ b/src/Compiler/Driver/fsc.fs @@ -171,57 +171,57 @@ let TypeCheck let byteReaderA () = ByteMemory.Empty.AsReadOnly() let byteReaderB = None - let tcInfo = + let tcInfo = GetTypecheckingData( assembly.FileName, assembly.ILScopeRef, assembly.RawMetadata.TryGetILModuleDef(), byteReaderA, - byteReaderB) + byteReaderB + ) let rawData = tcInfo.RawData - let topAttrs = { - mainMethodAttrs = rawData.MainMethodAttrs - netModuleAttrs = rawData.NetModuleAttrs - assemblyAttrs = rawData.AssemblyAttrs - } + + let topAttrs = + { + mainMethodAttrs = rawData.MainMethodAttrs + netModuleAttrs = rawData.NetModuleAttrs + assemblyAttrs = rawData.AssemblyAttrs + } // need to understand if anything can be used here, pickling state is hard tcInitialState, - topAttrs, + topAttrs, rawData.DeclaredImpls, // this is quite definitely wrong, need to figure out what to do with the environment tcInitialState.TcEnvFromImpls else - let tcState, topAttrs, declaredImpls, tcEnvAtEndOfLastFile = CheckClosedInputSet( - ctok, - diagnosticsLogger.CheckForErrors, - tcConfig, - tcImports, - tcGlobals, - None, - tcInitialState, - eagerFormat, - inputs - ) + let tcState, topAttrs, declaredImpls, tcEnvAtEndOfLastFile = + CheckClosedInputSet( + ctok, + diagnosticsLogger.CheckForErrors, + tcConfig, + tcImports, + tcGlobals, + None, + tcInitialState, + eagerFormat, + inputs + ) if false then - let tcInfo = { - MainMethodAttrs = topAttrs.mainMethodAttrs - NetModuleAttrs = topAttrs.netModuleAttrs - AssemblyAttrs = topAttrs.assemblyAttrs - DeclaredImpls = declaredImpls - } + let tcInfo = + { + MainMethodAttrs = topAttrs.mainMethodAttrs + NetModuleAttrs = topAttrs.netModuleAttrs + AssemblyAttrs = topAttrs.assemblyAttrs + DeclaredImpls = declaredImpls + } // will need to pass results further somewhere - let _typecheckingDataResources = EncodeTypecheckingData( - tcConfig, - tcGlobals, - tcState.Ccu, - outfile, - false, - tcInfo) + let _typecheckingDataResources = + EncodeTypecheckingData(tcConfig, tcGlobals, tcState.Ccu, outfile, false, tcInfo) () diff --git a/src/Compiler/Driver/fsc.fsi b/src/Compiler/Driver/fsc.fsi index 4d950c0a556..f4690542989 100644 --- a/src/Compiler/Driver/fsc.fsi +++ b/src/Compiler/Driver/fsc.fsi @@ -26,7 +26,7 @@ val internal TypeCheck: assemblyName: string * tcEnv0: CheckBasics.TcEnv * openDecls0: TypedTree.OpenDeclaration list * - inputs: ParsedInput list * + inputs: ParsedInput list * exiter: Exiter * outfile: string -> TcState * TopAttribs * CheckedImplFile list * CheckBasics.TcEnv diff --git a/src/Compiler/TypedTree/TypedTree.fsi b/src/Compiler/TypedTree/TypedTree.fsi index b17206500a2..7ca6d82585a 100644 --- a/src/Compiler/TypedTree/TypedTree.fsi +++ b/src/Compiler/TypedTree/TypedTree.fsi @@ -4297,12 +4297,11 @@ type PickledCcuInfo = [] member DebugText: string -type PickledTcInfo = { - MainMethodAttrs: Attribs - NetModuleAttrs: Attribs - AssemblyAttrs: Attribs - DeclaredImpls: CheckedImplFile list -} +type PickledTcInfo = + { MainMethodAttrs: Attribs + NetModuleAttrs: Attribs + AssemblyAttrs: Attribs + DeclaredImpls: CheckedImplFile list } /// Represents a set of free local values. Computed type cached by later phases /// (never cached type checking). Cached in expressions. Not pickled.