Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC

Commits:

14 changed files:

Changes:

  • compiler/GHC.hs
    ... ... @@ -30,7 +30,7 @@ module GHC (
    30 30
     
    
    31 31
             -- * Flags and settings
    
    32 32
             DynFlags(..), GeneralFlag(..), Severity(..), Backend, gopt,
    
    33
    -        ncgBackend, llvmBackend, viaCBackend, interpreterBackend, noBackend,
    
    33
    +        ncgBackend, llvmBackend, viaCBackend, bytecodeBackend, interpreterBackend, noBackend,
    
    34 34
             GhcMode(..), GhcLink(..),
    
    35 35
             parseDynamicFlags, parseTargetFiles,
    
    36 36
             getSessionDynFlags,
    

  • compiler/GHC/Driver/Backend.hs
    ... ... @@ -47,6 +47,7 @@ module GHC.Driver.Backend
    47 47
        , llvmBackend
    
    48 48
        , jsBackend
    
    49 49
        , viaCBackend
    
    50
    +   , bytecodeBackend
    
    50 51
        , interpreterBackend
    
    51 52
        , noBackend
    
    52 53
        , allBackends
    
    ... ... @@ -252,7 +253,7 @@ instance Show Backend where
    252 253
       show = backendDescription
    
    253 254
     
    
    254 255
     
    
    255
    -ncgBackend, llvmBackend, viaCBackend, interpreterBackend, jsBackend, noBackend
    
    256
    +ncgBackend, llvmBackend, viaCBackend, bytecodeBackend, interpreterBackend, jsBackend, noBackend
    
    256 257
         :: Backend
    
    257 258
     
    
    258 259
     -- | The native code generator.
    
    ... ... @@ -310,7 +311,11 @@ viaCBackend = Named ViaC
    310 311
     -- (foreign primops).
    
    311 312
     --
    
    312 313
     -- See "GHC.StgToByteCode"
    
    313
    -interpreterBackend = Named Interpreter
    
    314
    +bytecodeBackend = Named Bytecode
    
    315
    +
    
    316
    +{-# DEPRECATED interpreterBackend "Renamed to bytecodeBackend" #-}
    
    317
    +interpreterBackend = bytecodeBackend
    
    318
    +
    
    314 319
     
    
    315 320
     -- | A dummy back end that generates no code.
    
    316 321
     --
    
    ... ... @@ -419,7 +424,7 @@ backendDescription (Named NCG) = "native code generator"
    419 424
     backendDescription (Named LLVM)        = "LLVM"
    
    420 425
     backendDescription (Named ViaC)        = "compiling via C"
    
    421 426
     backendDescription (Named JavaScript)  = "compiling to JavaScript"
    
    422
    -backendDescription (Named Interpreter) = "byte-code interpreter"
    
    427
    +backendDescription (Named Bytecode) = "byte-code interpreter"
    
    423 428
     backendDescription (Named NoBackend)   = "no code generated"
    
    424 429
     
    
    425 430
     -- | This flag tells the compiler driver whether the back
    
    ... ... @@ -431,7 +436,7 @@ backendWritesFiles (Named NCG) = True
    431 436
     backendWritesFiles (Named LLVM)        = True
    
    432 437
     backendWritesFiles (Named ViaC)        = True
    
    433 438
     backendWritesFiles (Named JavaScript)  = True
    
    434
    -backendWritesFiles (Named Interpreter) = False
    
    439
    +backendWritesFiles (Named Bytecode) = False
    
    435 440
     backendWritesFiles (Named NoBackend)   = False
    
    436 441
     
    
    437 442
     -- | When the back end does write files, this value tells
    
    ... ... @@ -442,7 +447,7 @@ backendPipelineOutput (Named NCG) = Persistent
    442 447
     backendPipelineOutput (Named LLVM) = Persistent
    
    443 448
     backendPipelineOutput (Named ViaC) = Persistent
    
    444 449
     backendPipelineOutput (Named JavaScript)  = Persistent
    
    445
    -backendPipelineOutput (Named Interpreter) = NoOutputFile
    
    450
    +backendPipelineOutput (Named Bytecode) = NoOutputFile
    
    446 451
     backendPipelineOutput (Named NoBackend)   = NoOutputFile
    
    447 452
     
    
    448 453
     -- | This flag tells the driver whether the back end can
    
    ... ... @@ -453,7 +458,7 @@ backendCanReuseLoadedCode (Named NCG) = False
    453 458
     backendCanReuseLoadedCode (Named LLVM)        = False
    
    454 459
     backendCanReuseLoadedCode (Named ViaC)        = False
    
    455 460
     backendCanReuseLoadedCode (Named JavaScript)  = False
    
    456
    -backendCanReuseLoadedCode (Named Interpreter) = True
    
    461
    +backendCanReuseLoadedCode (Named Bytecode) = True
    
    457 462
     backendCanReuseLoadedCode (Named NoBackend)   = False
    
    458 463
     
    
    459 464
     -- | It is is true of every back end except @-fno-code@
    
    ... ... @@ -478,7 +483,7 @@ backendGeneratesCode (Named NCG) = True
    478 483
     backendGeneratesCode (Named LLVM)        = True
    
    479 484
     backendGeneratesCode (Named ViaC)        = True
    
    480 485
     backendGeneratesCode (Named JavaScript)  = True
    
    481
    -backendGeneratesCode (Named Interpreter) = True
    
    486
    +backendGeneratesCode (Named Bytecode) = True
    
    482 487
     backendGeneratesCode (Named NoBackend)   = False
    
    483 488
     
    
    484 489
     backendGeneratesCodeForHsBoot :: Backend -> Bool
    
    ... ... @@ -486,7 +491,7 @@ backendGeneratesCodeForHsBoot (Named NCG) = True
    486 491
     backendGeneratesCodeForHsBoot (Named LLVM)        = True
    
    487 492
     backendGeneratesCodeForHsBoot (Named ViaC)        = True
    
    488 493
     backendGeneratesCodeForHsBoot (Named JavaScript)  = True
    
    489
    -backendGeneratesCodeForHsBoot (Named Interpreter) = False
    
    494
    +backendGeneratesCodeForHsBoot (Named Bytecode) = False
    
    490 495
     backendGeneratesCodeForHsBoot (Named NoBackend)   = False
    
    491 496
     
    
    492 497
     -- | When set, this flag turns on interface writing for
    
    ... ... @@ -498,7 +503,7 @@ backendSupportsInterfaceWriting (Named NCG) = True
    498 503
     backendSupportsInterfaceWriting (Named LLVM)        = True
    
    499 504
     backendSupportsInterfaceWriting (Named ViaC)        = True
    
    500 505
     backendSupportsInterfaceWriting (Named JavaScript)  = True
    
    501
    -backendSupportsInterfaceWriting (Named Interpreter) = True
    
    506
    +backendSupportsInterfaceWriting (Named Bytecode) = True
    
    502 507
     backendSupportsInterfaceWriting (Named NoBackend)   = False
    
    503 508
     
    
    504 509
     -- | When preparing code for this back end, the type
    
    ... ... @@ -510,7 +515,7 @@ backendRespectsSpecialise (Named NCG) = True
    510 515
     backendRespectsSpecialise (Named LLVM)        = True
    
    511 516
     backendRespectsSpecialise (Named ViaC)        = True
    
    512 517
     backendRespectsSpecialise (Named JavaScript)  = True
    
    513
    -backendRespectsSpecialise (Named Interpreter) = False
    
    518
    +backendRespectsSpecialise (Named Bytecode) = False
    
    514 519
     backendRespectsSpecialise (Named NoBackend)   = False
    
    515 520
     
    
    516 521
     -- | This back end wants the `mi_top_env` field of a
    
    ... ... @@ -522,7 +527,7 @@ backendWantsGlobalBindings (Named LLVM) = False
    522 527
     backendWantsGlobalBindings (Named ViaC)        = False
    
    523 528
     backendWantsGlobalBindings (Named JavaScript)  = False
    
    524 529
     backendWantsGlobalBindings (Named NoBackend)   = False
    
    525
    -backendWantsGlobalBindings (Named Interpreter) = True
    
    530
    +backendWantsGlobalBindings (Named Bytecode) = True
    
    526 531
     
    
    527 532
     -- | The back end targets a technology that implements
    
    528 533
     -- `switch` natively.  (For example, LLVM or C.) Therefore
    
    ... ... @@ -534,7 +539,7 @@ backendHasNativeSwitch (Named NCG) = False
    534 539
     backendHasNativeSwitch (Named LLVM)        = True
    
    535 540
     backendHasNativeSwitch (Named ViaC)        = True
    
    536 541
     backendHasNativeSwitch (Named JavaScript)  = True
    
    537
    -backendHasNativeSwitch (Named Interpreter) = False
    
    542
    +backendHasNativeSwitch (Named Bytecode) = False
    
    538 543
     backendHasNativeSwitch (Named NoBackend)   = False
    
    539 544
     
    
    540 545
     -- | As noted in the documentation for
    
    ... ... @@ -548,7 +553,7 @@ backendPrimitiveImplementation (Named NCG) = NcgPrimitives
    548 553
     backendPrimitiveImplementation (Named LLVM)        = LlvmPrimitives
    
    549 554
     backendPrimitiveImplementation (Named JavaScript)  = JSPrimitives
    
    550 555
     backendPrimitiveImplementation (Named ViaC)        = GenericPrimitives
    
    551
    -backendPrimitiveImplementation (Named Interpreter) = GenericPrimitives
    
    556
    +backendPrimitiveImplementation (Named Bytecode) = GenericPrimitives
    
    552 557
     backendPrimitiveImplementation (Named NoBackend)   = GenericPrimitives
    
    553 558
     
    
    554 559
     -- | When this value is `IsValid`, the back end is
    
    ... ... @@ -560,7 +565,7 @@ backendSimdValidity (Named NCG) = IsValid
    560 565
     backendSimdValidity (Named LLVM)        = IsValid
    
    561 566
     backendSimdValidity (Named ViaC)        = NotValid $ unlines ["SIMD vector instructions require using the NCG or the LLVM backend."]
    
    562 567
     backendSimdValidity (Named JavaScript)  = NotValid $ unlines ["SIMD vector instructions require using the NCG or the LLVM backend."]
    
    563
    -backendSimdValidity (Named Interpreter) = NotValid $ unlines ["SIMD vector instructions require using the NCG or the LLVM backend."]
    
    568
    +backendSimdValidity (Named Bytecode) = NotValid $ unlines ["SIMD vector instructions require using the NCG or the LLVM backend."]
    
    564 569
     backendSimdValidity (Named NoBackend)   = NotValid $ unlines ["SIMD vector instructions require using the NCG or the LLVM backend."]
    
    565 570
     
    
    566 571
     -- | This flag says whether the back end supports large
    
    ... ... @@ -571,7 +576,7 @@ backendSupportsEmbeddedBlobs (Named NCG) = True
    571 576
     backendSupportsEmbeddedBlobs (Named LLVM)        = False
    
    572 577
     backendSupportsEmbeddedBlobs (Named ViaC)        = False
    
    573 578
     backendSupportsEmbeddedBlobs (Named JavaScript)  = False
    
    574
    -backendSupportsEmbeddedBlobs (Named Interpreter) = False
    
    579
    +backendSupportsEmbeddedBlobs (Named Bytecode) = False
    
    575 580
     backendSupportsEmbeddedBlobs (Named NoBackend)   = False
    
    576 581
     
    
    577 582
     -- | This flag tells the compiler driver that the back end
    
    ... ... @@ -586,7 +591,7 @@ backendNeedsPlatformNcgSupport (Named NCG) = True
    586 591
     backendNeedsPlatformNcgSupport (Named LLVM)        = False
    
    587 592
     backendNeedsPlatformNcgSupport (Named ViaC)        = False
    
    588 593
     backendNeedsPlatformNcgSupport (Named JavaScript)  = False
    
    589
    -backendNeedsPlatformNcgSupport (Named Interpreter) = False
    
    594
    +backendNeedsPlatformNcgSupport (Named Bytecode) = False
    
    590 595
     backendNeedsPlatformNcgSupport (Named NoBackend)   = False
    
    591 596
     
    
    592 597
     -- | This flag is set if the back end can generate code
    
    ... ... @@ -598,7 +603,7 @@ backendSupportsUnsplitProcPoints (Named NCG) = True
    598 603
     backendSupportsUnsplitProcPoints (Named LLVM)        = False
    
    599 604
     backendSupportsUnsplitProcPoints (Named ViaC)        = False
    
    600 605
     backendSupportsUnsplitProcPoints (Named JavaScript)  = False
    
    601
    -backendSupportsUnsplitProcPoints (Named Interpreter) = False
    
    606
    +backendSupportsUnsplitProcPoints (Named Bytecode) = False
    
    602 607
     backendSupportsUnsplitProcPoints (Named NoBackend)   = False
    
    603 608
     
    
    604 609
     -- | This flag guides the driver in resolving issues about
    
    ... ... @@ -616,7 +621,7 @@ backendSwappableWithViaC (Named NCG) = True
    616 621
     backendSwappableWithViaC (Named LLVM)        = True
    
    617 622
     backendSwappableWithViaC (Named ViaC)        = False
    
    618 623
     backendSwappableWithViaC (Named JavaScript)  = False
    
    619
    -backendSwappableWithViaC (Named Interpreter) = False
    
    624
    +backendSwappableWithViaC (Named Bytecode) = False
    
    620 625
     backendSwappableWithViaC (Named NoBackend)   = False
    
    621 626
     
    
    622 627
     -- | This flag is true if the back end works *only* with
    
    ... ... @@ -626,7 +631,7 @@ backendUnregisterisedAbiOnly (Named NCG) = False
    626 631
     backendUnregisterisedAbiOnly (Named LLVM)        = False
    
    627 632
     backendUnregisterisedAbiOnly (Named ViaC)        = True
    
    628 633
     backendUnregisterisedAbiOnly (Named JavaScript)  = False
    
    629
    -backendUnregisterisedAbiOnly (Named Interpreter) = False
    
    634
    +backendUnregisterisedAbiOnly (Named Bytecode) = False
    
    630 635
     backendUnregisterisedAbiOnly (Named NoBackend)   = False
    
    631 636
     
    
    632 637
     -- | This flag is set if the back end generates C code in
    
    ... ... @@ -637,7 +642,7 @@ backendGeneratesHc (Named NCG) = False
    637 642
     backendGeneratesHc (Named LLVM)        = False
    
    638 643
     backendGeneratesHc (Named ViaC)        = True
    
    639 644
     backendGeneratesHc (Named JavaScript)  = False
    
    640
    -backendGeneratesHc (Named Interpreter) = False
    
    645
    +backendGeneratesHc (Named Bytecode) = False
    
    641 646
     backendGeneratesHc (Named NoBackend)   = False
    
    642 647
     
    
    643 648
     -- | This flag says whether SPT (static pointer table)
    
    ... ... @@ -649,7 +654,7 @@ backendSptIsDynamic (Named NCG) = False
    649 654
     backendSptIsDynamic (Named LLVM)        = False
    
    650 655
     backendSptIsDynamic (Named ViaC)        = False
    
    651 656
     backendSptIsDynamic (Named JavaScript)  = False
    
    652
    -backendSptIsDynamic (Named Interpreter) = True
    
    657
    +backendSptIsDynamic (Named Bytecode) = True
    
    653 658
     backendSptIsDynamic (Named NoBackend)   = False
    
    654 659
     
    
    655 660
     -- | If this flag is unset, then the driver ignores the flag @-fbreak-points@,
    
    ... ... @@ -660,7 +665,7 @@ backendSupportsBreakpoints = \case
    660 665
       Named LLVM        -> False
    
    661 666
       Named ViaC        -> False
    
    662 667
       Named JavaScript  -> False
    
    663
    -  Named Interpreter -> True
    
    668
    +  Named Bytecode -> True
    
    664 669
       Named NoBackend   -> False
    
    665 670
     
    
    666 671
     -- | If this flag is set, then the driver forces the
    
    ... ... @@ -671,7 +676,7 @@ backendForcesOptimization0 (Named NCG) = False
    671 676
     backendForcesOptimization0 (Named LLVM)        = False
    
    672 677
     backendForcesOptimization0 (Named ViaC)        = False
    
    673 678
     backendForcesOptimization0 (Named JavaScript)  = False
    
    674
    -backendForcesOptimization0 (Named Interpreter) = True
    
    679
    +backendForcesOptimization0 (Named Bytecode) = True
    
    675 680
     backendForcesOptimization0 (Named NoBackend)   = False
    
    676 681
     
    
    677 682
     -- | I don't understand exactly how this works.  But if
    
    ... ... @@ -683,7 +688,7 @@ backendNeedsFullWays (Named NCG) = False
    683 688
     backendNeedsFullWays (Named LLVM)        = False
    
    684 689
     backendNeedsFullWays (Named ViaC)        = False
    
    685 690
     backendNeedsFullWays (Named JavaScript)  = False
    
    686
    -backendNeedsFullWays (Named Interpreter) = True
    
    691
    +backendNeedsFullWays (Named Bytecode) = True
    
    687 692
     backendNeedsFullWays (Named NoBackend)   = False
    
    688 693
     
    
    689 694
     -- | This flag is also special for the interpreter: if a
    
    ... ... @@ -695,7 +700,7 @@ backendSpecialModuleSource (Named NCG) = const Nothing
    695 700
     backendSpecialModuleSource (Named LLVM)        = const Nothing
    
    696 701
     backendSpecialModuleSource (Named ViaC)        = const Nothing
    
    697 702
     backendSpecialModuleSource (Named JavaScript)  = const Nothing
    
    698
    -backendSpecialModuleSource (Named Interpreter) = \b -> if b then Just "interpreted" else Nothing
    
    703
    +backendSpecialModuleSource (Named Bytecode) = \b -> if b then Just "interpreted" else Nothing
    
    699 704
     backendSpecialModuleSource (Named NoBackend)   = const (Just "nothing")
    
    700 705
     
    
    701 706
     -- | This flag says whether the back end supports Haskell
    
    ... ... @@ -707,7 +712,7 @@ backendSupportsHpc (Named NCG) = True
    707 712
     backendSupportsHpc (Named LLVM)        = True
    
    708 713
     backendSupportsHpc (Named ViaC)        = True
    
    709 714
     backendSupportsHpc (Named JavaScript)  = False
    
    710
    -backendSupportsHpc (Named Interpreter) = False
    
    715
    +backendSupportsHpc (Named Bytecode) = False
    
    711 716
     backendSupportsHpc (Named NoBackend)   = True
    
    712 717
     
    
    713 718
     -- | This flag says whether the back end supports foreign
    
    ... ... @@ -718,7 +723,7 @@ backendSupportsCImport (Named NCG) = True
    718 723
     backendSupportsCImport (Named LLVM)        = True
    
    719 724
     backendSupportsCImport (Named ViaC)        = True
    
    720 725
     backendSupportsCImport (Named JavaScript)  = True
    
    721
    -backendSupportsCImport (Named Interpreter) = True
    
    726
    +backendSupportsCImport (Named Bytecode) = True
    
    722 727
     backendSupportsCImport (Named NoBackend)   = True
    
    723 728
     
    
    724 729
     -- | This flag says whether the back end supports foreign
    
    ... ... @@ -728,7 +733,7 @@ backendSupportsCExport (Named NCG) = True
    728 733
     backendSupportsCExport (Named LLVM)        = True
    
    729 734
     backendSupportsCExport (Named ViaC)        = True
    
    730 735
     backendSupportsCExport (Named JavaScript)  = True
    
    731
    -backendSupportsCExport (Named Interpreter) = False
    
    736
    +backendSupportsCExport (Named Bytecode) = False
    
    732 737
     backendSupportsCExport (Named NoBackend)   = True
    
    733 738
     
    
    734 739
     -- | When using this back end, it may be necessary or
    
    ... ... @@ -749,7 +754,7 @@ backendCDefs (Named NCG) = NoCDefs
    749 754
     backendCDefs (Named LLVM)        = LlvmCDefs
    
    750 755
     backendCDefs (Named ViaC)        = NoCDefs
    
    751 756
     backendCDefs (Named JavaScript)  = NoCDefs
    
    752
    -backendCDefs (Named Interpreter) = NoCDefs
    
    757
    +backendCDefs (Named Bytecode) = NoCDefs
    
    753 758
     backendCDefs (Named NoBackend)   = NoCDefs
    
    754 759
     
    
    755 760
     -- | This (defunctionalized) function generates code and
    
    ... ... @@ -768,7 +773,7 @@ backendCodeOutput (Named NCG) = NcgCodeOutput
    768 773
     backendCodeOutput (Named LLVM)        = LlvmCodeOutput
    
    769 774
     backendCodeOutput (Named ViaC)        = ViaCCodeOutput
    
    770 775
     backendCodeOutput (Named JavaScript)  = JSCodeOutput
    
    771
    -backendCodeOutput (Named Interpreter) = panic "backendCodeOutput: interpreterBackend"
    
    776
    +backendCodeOutput (Named Bytecode) = panic "backendCodeOutput: bytecodeBackend"
    
    772 777
     backendCodeOutput (Named NoBackend)   = panic "backendCodeOutput: noBackend"
    
    773 778
     
    
    774 779
     backendUseJSLinker :: Backend -> Bool
    
    ... ... @@ -776,7 +781,7 @@ backendUseJSLinker (Named NCG) = False
    776 781
     backendUseJSLinker (Named LLVM)        = False
    
    777 782
     backendUseJSLinker (Named ViaC)        = False
    
    778 783
     backendUseJSLinker (Named JavaScript)  = True
    
    779
    -backendUseJSLinker (Named Interpreter) = False
    
    784
    +backendUseJSLinker (Named Bytecode) = False
    
    780 785
     backendUseJSLinker (Named NoBackend)   = False
    
    781 786
     
    
    782 787
     -- | This (defunctionalized) function tells the compiler
    
    ... ... @@ -795,7 +800,7 @@ backendPostHscPipeline (Named NCG) = NcgPostHscPipeline
    795 800
     backendPostHscPipeline (Named LLVM) = LlvmPostHscPipeline
    
    796 801
     backendPostHscPipeline (Named ViaC) = ViaCPostHscPipeline
    
    797 802
     backendPostHscPipeline (Named JavaScript)  = JSPostHscPipeline
    
    798
    -backendPostHscPipeline (Named Interpreter) = NoPostHscPipeline
    
    803
    +backendPostHscPipeline (Named Bytecode) = NoPostHscPipeline
    
    799 804
     backendPostHscPipeline (Named NoBackend) = NoPostHscPipeline
    
    800 805
     
    
    801 806
     -- | Somewhere in the compiler driver, when compiling
    
    ... ... @@ -809,7 +814,7 @@ backendNormalSuccessorPhase (Named NCG) = As False
    809 814
     backendNormalSuccessorPhase (Named LLVM) = LlvmOpt
    
    810 815
     backendNormalSuccessorPhase (Named ViaC) = HCc
    
    811 816
     backendNormalSuccessorPhase (Named JavaScript)  = StopLn
    
    812
    -backendNormalSuccessorPhase (Named Interpreter) = StopLn
    
    817
    +backendNormalSuccessorPhase (Named Bytecode) = StopLn
    
    813 818
     backendNormalSuccessorPhase (Named NoBackend)   = StopLn
    
    814 819
     
    
    815 820
     -- | Name of the back end, if any.  Used to migrate legacy
    
    ... ... @@ -820,7 +825,7 @@ backendName (Named NCG) = NCG
    820 825
     backendName (Named LLVM) = LLVM
    
    821 826
     backendName (Named ViaC) = ViaC
    
    822 827
     backendName (Named JavaScript)  = JavaScript
    
    823
    -backendName (Named Interpreter) = Interpreter
    
    828
    +backendName (Named Bytecode) = Bytecode
    
    824 829
     backendName (Named NoBackend)   = NoBackend
    
    825 830
     
    
    826 831
     
    
    ... ... @@ -833,7 +838,7 @@ allBackends = [ ncgBackend
    833 838
                   , llvmBackend
    
    834 839
                   , viaCBackend
    
    835 840
                   , jsBackend
    
    836
    -              , interpreterBackend
    
    841
    +              , bytecodeBackend
    
    837 842
                   , noBackend
    
    838 843
                   ]
    
    839 844
     
    

  • compiler/GHC/Driver/Backend/Internal.hs
    ... ... @@ -28,6 +28,6 @@ data BackendName
    28 28
        | LLVM          -- ^ Names the LLVM backend.
    
    29 29
        | ViaC          -- ^ Names the Via-C backend.
    
    30 30
        | JavaScript    -- ^ Names the JS backend.
    
    31
    -   | Interpreter   -- ^ Names the ByteCode interpreter.
    
    31
    +   | Bytecode      -- ^ Names the ByteCode interpreter.
    
    32 32
        | NoBackend     -- ^ Names the `-fno-code` backend.
    
    33 33
      deriving (Eq, Show)

  • compiler/GHC/Driver/Downsweep.hs
    ... ... @@ -916,7 +916,7 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = do
    916 916
                        else (,) <$> (new_temp_file (hiSuf_ dflags) (dynHiSuf_ dflags))
    
    917 917
                                 <*> (new_temp_file (objectSuf_ dflags) (dynObjectSuf_ dflags))
    
    918 918
                    let new_dflags = case enable_spec of
    
    919
    -                                  EnableByteCode -> dflags { backend = interpreterBackend }
    
    919
    +                                  EnableByteCode -> dflags { backend = bytecodeBackend }
    
    920 920
                                       EnableObject   -> dflags { backend = defaultBackendOf ms }
    
    921 921
                                       EnableByteCodeAndObject -> (gopt_set dflags Opt_ByteCodeAndObjectCode) { backend = defaultBackendOf ms}
    
    922 922
                    let ms' = ms
    

  • compiler/GHC/Driver/Pipeline.hs
    ... ... @@ -281,8 +281,8 @@ compileOne' mHscMessage
    281 281
              -- was set), force it to generate byte-code. This is NOT transitive and
    
    282 282
              -- only applies to direct targets.
    
    283 283
              | loadAsByteCode
    
    284
    -         = ( interpreterBackend
    
    285
    -           , gopt_set (lcl_dflags { backend = interpreterBackend }) Opt_ForceRecomp
    
    284
    +         = ( bytecodeBackend
    
    285
    +           , gopt_set (lcl_dflags { backend = bytecodeBackend }) Opt_ForceRecomp
    
    286 286
                )
    
    287 287
     
    
    288 288
              | otherwise
    

  • compiler/GHC/Driver/Session.hs
    ... ... @@ -1931,7 +1931,7 @@ dynamic_flags_deps = [
    1931 1931
                       d { ghcLink=NoLink }) >> setBackend noBackend))
    
    1932 1932
       , make_ord_flag defFlag "fbyte-code"
    
    1933 1933
           (noArgM $ \dflags -> do
    
    1934
    -        setBackend interpreterBackend
    
    1934
    +        setBackend bytecodeBackend
    
    1935 1935
             pure $ flip gopt_unset Opt_ByteCodeAndObjectCode (gopt_set dflags Opt_ByteCode))
    
    1936 1936
       , make_ord_flag defFlag "fobject-code"     $ noArgM $ \dflags -> do
    
    1937 1937
           setBackend $ platformDefaultBackend (targetPlatform dflags)
    

  • docs/users_guide/extending_ghc.rst
    ... ... @@ -1719,7 +1719,7 @@ constructor from version 9.4 with the corresponding value from 9.6:
    1719 1719
     +-----------------+------------------------+
    
    1720 1720
     | ``ViaC``        | ``viaCBackend``        |
    
    1721 1721
     +-----------------+------------------------+
    
    1722
    -| ``Interpreter`` | ``interpreterBackend`` |
    
    1722
    +| ``Interpreter`` | ``bytecodeBackend``    |
    
    1723 1723
     +-----------------+------------------------+
    
    1724 1724
     | ``NoBackend``   | ``noBackend``          |
    
    1725 1725
     +-----------------+------------------------+
    

  • ghc/Main.hs
    ... ... @@ -169,9 +169,9 @@ main' postLoadMode units dflags0 args flagWarnings = do
    169 169
       let dflt_backend = backend dflags0
    
    170 170
           (mode, bcknd, link)
    
    171 171
              = case postLoadMode of
    
    172
    -               DoInteractive   -> (CompManager, interpreterBackend,  LinkInMemory)
    
    173
    -               DoEval _        -> (CompManager, interpreterBackend,  LinkInMemory)
    
    174
    -               DoRun           -> (CompManager, interpreterBackend,  LinkInMemory)
    
    172
    +               DoInteractive   -> (CompManager, bytecodeBackend,  LinkInMemory)
    
    173
    +               DoEval _        -> (CompManager, bytecodeBackend,  LinkInMemory)
    
    174
    +               DoRun           -> (CompManager, bytecodeBackend,  LinkInMemory)
    
    175 175
                    DoMake          -> (CompManager, dflt_backend, LinkBinary)
    
    176 176
                    DoBackpack      -> (CompManager, dflt_backend, LinkBinary)
    
    177 177
                    DoMkDependHS    -> (MkDepend,    dflt_backend, LinkBinary)
    

  • testsuite/tests/driver/T5313.hs
    ... ... @@ -7,7 +7,7 @@ main = do
    7 7
           -- begin initialize
    
    8 8
           df0 <- GHC.getSessionDynFlags
    
    9 9
           let df1 = df0{GHC.ghcMode    = GHC.CompManager,
    
    10
    -                    GHC.backend    = GHC.interpreterBackend,
    
    10
    +                    GHC.backend    = GHC.bytecodeBackend,
    
    11 11
                         GHC.ghcLink    = GHC.LinkInMemory,
    
    12 12
                         GHC.verbosity  = 0}
    
    13 13
           _ <- GHC.setSessionDynFlags df1
    

  • testsuite/tests/ghc-api/T10052/T10052.hs
    ... ... @@ -24,7 +24,7 @@ runGhc' args act = do
    24 24
           logger <- getLogger
    
    25 25
           (dflags1, _leftover, _warns) <- parseDynamicFlags logger dflags0 flags
    
    26 26
           let dflags2 = dflags1 {
    
    27
    -              backend   = interpreterBackend
    
    27
    +              backend   = bytecodeBackend
    
    28 28
                 , ghcLink   = LinkInMemory
    
    29 29
                 , verbosity = 1
    
    30 30
                 }
    

  • testsuite/tests/ghc-api/T8639_api.hs
    ... ... @@ -11,7 +11,7 @@ main
    11 11
      = do { [libdir] <- getArgs
    
    12 12
           ; runGhc (Just libdir) $ do
    
    13 13
                flags <- getSessionDynFlags
    
    14
    -           setSessionDynFlags (flags{ backend = interpreterBackend, ghcLink = LinkInMemory})
    
    14
    +           setSessionDynFlags (flags{ backend = bytecodeBackend, ghcLink = LinkInMemory})
    
    15 15
                target <- guessTarget "T8639_api_a.hs" Nothing Nothing
    
    16 16
                setTargets [target]
    
    17 17
                load LoadAllTargets
    

  • testsuite/tests/ghc-api/apirecomp001/myghc.hs
    ... ... @@ -37,7 +37,7 @@ main = do
    37 37
         prn "target nothing: ok"
    
    38 38
     
    
    39 39
         dflags <- getSessionDynFlags
    
    40
    -    setSessionDynFlags $ dflags { backend = interpreterBackend }
    
    40
    +    setSessionDynFlags $ dflags { backend = bytecodeBackend }
    
    41 41
         ok <- load LoadAllTargets
    
    42 42
         when (failed ok) $ error "Couldn't load A.hs in interpreted mode"
    
    43 43
         prn "target interpreted: ok"
    

  • testsuite/tests/ghci-wasm/T26431.hs
    ... ... @@ -16,7 +16,7 @@ main = do
    16 16
             let dflags1 =
    
    17 17
                   dflags0
    
    18 18
                     { ghcMode = CompManager,
    
    19
    -                  backend = interpreterBackend,
    
    19
    +                  backend = bytecodeBackend,
    
    20 20
                       ghcLink = LinkInMemory
    
    21 21
                     }
    
    22 22
             logger <- getLogger
    

  • testsuite/tests/ghci/linking/dyn/T3372.hs
    ... ... @@ -44,7 +44,7 @@ newGhcServer = do (libdir:_) <- getArgs
    44 44
       where ghc action libdir = GHC.runGhc (Just libdir) (init >> action)
    
    45 45
             init = do df <- GHC.getSessionDynFlags
    
    46 46
                       GHC.setSessionDynFlags df{GHC.ghcMode    = GHC.CompManager,
    
    47
    -                                            GHC.backend    = GHC.interpreterBackend,
    
    47
    +                                            GHC.backend    = GHC.bytecodeBackend,
    
    48 48
                                                 GHC.ghcLink    = GHC.LinkInMemory,
    
    49 49
                                                 GHC.verbosity  = 0}
    
    50 50