Skip to content

Commit

Permalink
Remove Geb backend (#2886)
Browse files Browse the repository at this point in the history
* Closes #2840
  • Loading branch information
paulcadman authored Jul 11, 2024
1 parent ea359ad commit 40f5be4
Show file tree
Hide file tree
Showing 210 changed files with 3 additions and 5,852 deletions.
2 changes: 0 additions & 2 deletions app/Commands/Compile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ where
import Commands.Base
import Commands.Compile.Anoma qualified as Anoma
import Commands.Compile.Cairo qualified as Cairo
import Commands.Compile.Geb qualified as Geb
import Commands.Compile.Native qualified as Native
import Commands.Compile.Options
import Commands.Compile.RiscZeroRust qualified as RiscZeroRust
Expand All @@ -18,7 +17,6 @@ runCommand :: (Members '[EmbedIO, App, TaggedLock] r) => CompileCommand -> Sem r
runCommand = \case
Native opts -> Native.runCommand opts
Wasi opts -> Wasi.runCommand opts
Geb opts -> Geb.runCommand opts
Anoma opts -> Anoma.runCommand opts
Cairo opts -> Cairo.runCommand opts
Vampir opts -> Vampir.runCommand opts
Expand Down
37 changes: 0 additions & 37 deletions app/Commands/Compile/Geb.hs

This file was deleted.

35 changes: 0 additions & 35 deletions app/Commands/Compile/Geb/Options.hs

This file was deleted.

3 changes: 0 additions & 3 deletions app/Commands/Compile/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ where

import Commands.Compile.Anoma.Options
import Commands.Compile.Cairo.Options
import Commands.Compile.Geb.Options
import Commands.Compile.Native.Options
import Commands.Compile.RiscZeroRust.Options
import Commands.Compile.Vampir.Options
Expand All @@ -16,7 +15,6 @@ import CommonOptions
data CompileCommand
= Native (NativeOptions 'InputMain)
| Wasi (WasiOptions 'InputMain)
| Geb (GebOptions 'InputMain)
| Vampir (VampirOptions 'InputMain)
| Anoma (AnomaOptions 'InputMain)
| Cairo (CairoOptions 'InputMain)
Expand All @@ -31,7 +29,6 @@ supportedTargets =
[ (AppTargetVampIR, Vampir <$> parseVampir),
(AppTargetAnoma, Anoma <$> parseAnoma),
(AppTargetCairo, Cairo <$> parseCairo),
(AppTargetGeb, Geb <$> parseGeb),
(AppTargetWasm32Wasi, Wasi <$> parseWasi),
(AppTargetNative64, Native <$> parseNative),
(AppTargetRiscZeroRust, RiscZeroRust <$> parseRiscZeroRust)
Expand Down
2 changes: 0 additions & 2 deletions app/Commands/Dev.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import Commands.Dev.Casm qualified as Casm
import Commands.Dev.Core qualified as Core
import Commands.Dev.DevCompile qualified as DevCompile
import Commands.Dev.DisplayRoot qualified as DisplayRoot
import Commands.Dev.Geb qualified as Geb
import Commands.Dev.Highlight qualified as Highlight
import Commands.Dev.ImportTree qualified as ImportTree
import Commands.Dev.Internal qualified as Internal
Expand All @@ -35,7 +34,6 @@ runCommand = \case
Internal opts -> Internal.runCommand opts
Termination opts -> Termination.runCommand opts
Core opts -> Core.runCommand opts
Geb opts -> Geb.runCommand opts
Asm opts -> Asm.runCommand opts
Reg opts -> Reg.runCommand opts
Tree opts -> Tree.runCommand opts
Expand Down
1 change: 0 additions & 1 deletion app/Commands/Dev/Asm/Compile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ runCommand opts = do
AppTargetRiscZeroRust -> err "RISC0 Rust"
AppTargetAnoma -> err "Anoma"
AppTargetTree -> err "JuvixTree"
AppTargetGeb -> err "GEB"
AppTargetVampIR -> err "VampIR"
AppTargetCore -> err "JuvixCore"
AppTargetAsm -> err "JuvixAsm"
Expand Down
1 change: 0 additions & 1 deletion app/Commands/Dev/Casm/Compile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ runCommand opts = do
AppTargetReg -> err "JuvixReg"
AppTargetAnoma -> err "Anoma"
AppTargetTree -> err "JuvixTree"
AppTargetGeb -> err "GEB"
AppTargetVampIR -> err "VampIR"
AppTargetCore -> err "JuvixCore"
AppTargetAsm -> err "JuvixAsm"
Expand Down
1 change: 0 additions & 1 deletion app/Commands/Dev/Core/Compile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ runCommand opts = do
case opts ^. compileTarget of
AppTargetWasm32Wasi -> runCPipeline arg
AppTargetNative64 -> runCPipeline arg
AppTargetGeb -> runGebPipeline arg
AppTargetVampIR -> runVampIRPipeline arg
AppTargetCore -> return ()
AppTargetAsm -> runAsmPipeline arg
Expand Down
27 changes: 0 additions & 27 deletions app/Commands/Dev/Core/Compile/Base.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import Data.Aeson qualified as JSON
import Juvix.Compiler.Asm.Pretty qualified as Asm
import Juvix.Compiler.Backend qualified as Backend
import Juvix.Compiler.Backend.C qualified as C
import Juvix.Compiler.Backend.Geb qualified as Geb
import Juvix.Compiler.Backend.Rust.Data.Result qualified as Rust
import Juvix.Compiler.Backend.VampIR.Translation qualified as VampIR
import Juvix.Compiler.Casm.Data.Result qualified as Casm
Expand All @@ -18,7 +17,6 @@ import Juvix.Compiler.Core.Data.TransformationId qualified as Core
import Juvix.Compiler.Reg.Pretty qualified as Reg
import Juvix.Compiler.Tree.Pretty qualified as Tree
import Juvix.Prelude.Pretty
import System.FilePath (takeBaseName)

data PipelineArg = PipelineArg
{ _pipelineArgOptions :: CompileOptions,
Expand All @@ -41,7 +39,6 @@ getEntry PipelineArg {..} = do
getTarget = \case
AppTargetWasm32Wasi -> Backend.TargetCWasm32Wasi
AppTargetNative64 -> Backend.TargetCNative64
AppTargetGeb -> Backend.TargetGeb
AppTargetVampIR -> Backend.TargetVampIR
AppTargetCore -> Backend.TargetCore
AppTargetAsm -> Backend.TargetAsm
Expand Down Expand Up @@ -86,30 +83,6 @@ runCPipeline pa@PipelineArg {..} = do
ensureDir buildDir
return (buildDir <//> replaceExtension' ".c" (filename inputFileCompile))

runGebPipeline ::
forall r.
(Members '[EmbedIO, App, TaggedLock] r) =>
PipelineArg ->
Sem r ()
runGebPipeline pa@PipelineArg {..} = do
entryPoint <- getEntry pa
gebFile <- Compile.outputFile _pipelineArgOptions
let spec
| _pipelineArgOptions ^. compileTerm = Geb.OnlyTerm
| otherwise =
Geb.LispPackage
Geb.LispPackageSpec
{ _lispPackageName = fromString . takeBaseName $ toFilePath gebFile,
_lispPackageEntry = "*entry*"
}
Geb.Result {..} <-
getRight
. run
. runReader entryPoint
. runError @JuvixError
$ coreToGeb spec _pipelineArgModule
writeFileEnsureLn gebFile _resultCode

runVampIRPipeline ::
forall r.
(Members '[EmbedIO, App, TaggedLock] r) =>
Expand Down
1 change: 0 additions & 1 deletion app/Commands/Dev/Core/Compile/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ coreSupportedTargets =
NonEmpty.fromList
[ AppTargetNative64,
AppTargetWasm32Wasi,
AppTargetGeb,
AppTargetVampIR,
AppTargetTree,
AppTargetAsm,
Expand Down
2 changes: 1 addition & 1 deletion app/Commands/Dev/Core/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ parseCoreCommand =
compileInfo =
info
(CoreCompile <$> parseCoreCompileOptions)
(progDesc "Compile a JuvixCore file to native code, WebAssembly, GEB or VampIR")
(progDesc "Compile a JuvixCore file to native code, WebAssembly, or VampIR")
21 changes: 0 additions & 21 deletions app/Commands/Dev/Geb.hs

This file was deleted.

26 changes: 0 additions & 26 deletions app/Commands/Dev/Geb/Check.hs

This file was deleted.

58 changes: 0 additions & 58 deletions app/Commands/Dev/Geb/Eval.hs

This file was deleted.

38 changes: 0 additions & 38 deletions app/Commands/Dev/Geb/Eval/Options.hs

This file was deleted.

Loading

0 comments on commit 40f5be4

Please sign in to comment.