<commit_before>// Copyright (c) Microsoft Corporation.  All Rights Reserved.  See License.txt in the project root for license information.

module internal FSharp.Compiler.CommandLineMain

open System
open System.Reflection
open System.Runtime
open System.Runtime.CompilerServices
open System.Threading

open Internal.Utilities.Library
open Internal.Utilities.Library.Extras
open FSharp.Compiler.AbstractIL
open FSharp.Compiler.AbstractIL.ILBinaryReader
open FSharp.Compiler.CompilerConfig
open FSharp.Compiler.Driver
open FSharp.Compiler.DiagnosticsLogger
open FSharp.Compiler.CodeAnalysis
open FSharp.Compiler.Text

[<Dependency("FSharp.Compiler.Service", LoadHint.Always)>]
do ()

[<EntryPoint>]
let main (argv) =

    let compilerName =
        // the 64 bit desktop version of the compiler is name fscAnyCpu.exe, all others are fsc.exe
        if
            Environment.Is64BitProcess
            && typeof<obj>.Assembly.GetName().Name <> "System.Private.CoreLib"
        then
            "fscAnyCpu.exe"
        else
            "fsc.exe"

    // Set the garbage collector to batch mode, which improves overall performance.
    GCSettings.LatencyMode <- GCLatencyMode.Batch
    Thread.CurrentThread.Name <- "F# Main Thread"

    // Set the initial phase to garbage collector to batch mode, which improves overall performance.
    use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parameter

    // An SDL recommendation
    UnmanagedProcessExecutionOptions.EnableHeapTerminationOnCorruption()

    try

        // We are on a compilation thread
        let ctok = AssumeCompilationThreadWithoutEvidence()

        // The F# compiler expects 'argv' to include the executable name, though it makes no use of it.
        let argv = Array.append [| compilerName |] argv
<commit_msg>stop using batch mdoe (#13742)<commit_after>// Copyright (c) Microsoft Corporation.  All Rights Reserved.  See License.txt in the project root for license information.

module internal FSharp.Compiler.CommandLineMain

open System
open System.Reflection
open System.Runtime
open System.Runtime.CompilerServices
open System.Threading

open Internal.Utilities.Library
open Internal.Utilities.Library.Extras
open FSharp.Compiler.AbstractIL
open FSharp.Compiler.AbstractIL.ILBinaryReader
open FSharp.Compiler.CompilerConfig
open FSharp.Compiler.Driver
open FSharp.Compiler.DiagnosticsLogger
open FSharp.Compiler.CodeAnalysis
open FSharp.Compiler.Text

[<Dependency("FSharp.Compiler.Service", LoadHint.Always)>]
do ()

[<EntryPoint>]
let main (argv) =

    let compilerName =
        // the 64 bit desktop version of the compiler is name fscAnyCpu.exe, all others are fsc.exe
        if
            Environment.Is64BitProcess
            && typeof<obj>.Assembly.GetName().Name <> "System.Private.CoreLib"
        then
            "fscAnyCpu.exe"
        else
            "fsc.exe"

    Thread.CurrentThread.Name <- "F# Main Thread"

    // Set the initial phase to garbage collector to batch mode, which improves overall performance.
    use unwindBuildPhase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parameter

    // An SDL recommendation
    UnmanagedProcessExecutionOptions.EnableHeapTerminationOnCorruption()

    try

        // We are on a compilation thread
        let ctok = AssumeCompilationThreadWithoutEvidence()

        // The F# compiler expects 'argv' to include the executable name, though it makes no use of it.
        let argv = Array.append [| compilerName |] argv

{'fraction_non_alphanumeric': 0.07374461979913917, 'fraction_numerical': 0.0037302725968436155, 'mean_word_length': 3.480719794344473, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5480020', 'n_tokens_mistral': 961, 'n_tokens_neox': 901, 'n_words': 293}