Skip to content

Commit dd0ce1a

Browse files
committed
Remove the integrated REPL
1 parent 9c8be74 commit dd0ce1a

18 files changed

+3
-1800
lines changed

include/swift/AST/IRGenOptions.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,6 @@ class IRGenOptions {
181181
/// Whether we're generating IR for the JIT.
182182
unsigned UseJIT : 1;
183183

184-
/// Whether we're generating code for the integrated REPL.
185-
unsigned IntegratedREPL : 1;
186-
187184
/// Whether we should run LLVM optimizations after IRGen.
188185
unsigned DisableLLVMOptzns : 1;
189186

@@ -320,7 +317,7 @@ class IRGenOptions {
320317
DebugInfoLevel(IRGenDebugInfoLevel::None),
321318
DebugInfoFormat(IRGenDebugInfoFormat::None),
322319
DisableClangModuleSkeletonCUs(false), UseJIT(false),
323-
IntegratedREPL(false), DisableLLVMOptzns(false),
320+
DisableLLVMOptzns(false),
324321
DisableSwiftSpecificLLVMOptzns(false), DisableLLVMSLPVectorizer(false),
325322
DisableFPElim(true), Playground(false), EmitStackPromotionChecks(false),
326323
FunctionSections(false), PrintInlineTree(false), EmbedMode(IRGenEmbedMode::None),

include/swift/Immediate/Immediate.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ namespace swift {
4141
int RunImmediately(CompilerInstance &CI, const ProcessCmdLine &CmdLine,
4242
const IRGenOptions &IRGenOpts, const SILOptions &SILOpts,
4343
std::unique_ptr<SILModule> &&SM);
44-
45-
void runREPL(CompilerInstance &CI, const ProcessCmdLine &CmdLine,
46-
bool ParseStdlib);
4744
} // end namespace swift
4845

4946
#endif // SWIFT_IMMEDIATE_IMMEDIATE_H

lib/FrontendTool/FrontendTool.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,9 +1278,8 @@ static bool performCompile(CompilerInstance &Instance,
12781278
(void)migrator::updateCodeAndEmitRemapIfNeeded(&Instance);
12791279

12801280
if (Action == FrontendOptions::ActionType::REPL) {
1281-
runREPL(Instance, ProcessCmdLine(Args.begin(), Args.end()),
1282-
Invocation.getParseStdlib());
1283-
return Context.hadError();
1281+
llvm::report_fatal_error("Compiler-internal integrated REPL has been "
1282+
"removed; use the LLDB-enhanced REPL instead.");
12841283
}
12851284

12861285
if (auto r = dumpASTIfNeeded(Instance))

lib/IRGen/GenDecl.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3020,11 +3020,6 @@ IRGenModule::getAddrOfLLVMVariableOrGOTEquivalent(LinkEntity entity) {
30203020
cast<llvm::GlobalValue>(entry), entity);
30213021
return {gotEquivalent, ConstantReference::Indirect};
30223022
};
3023-
3024-
// The integrated REPL incrementally adds new definitions, so always use
3025-
// indirect references in this mode.
3026-
if (IRGen.Opts.IntegratedREPL)
3027-
return indirect();
30283023

30293024
// Dynamically replaceable function keys are stored in the GlobalVars
30303025
// table, but they don't have an associated Decl, so they require

lib/Immediate/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
add_swift_host_library(swiftImmediate STATIC
22
Immediate.cpp
3-
REPL.cpp
43
LLVM_LINK_COMPONENTS
54
executionengine
65
linker
@@ -14,9 +13,3 @@ target_link_libraries(swiftImmediate PRIVATE
1413
swiftIRGen
1514
swiftSILGen
1615
swiftSILOptimizer)
17-
if(LibEdit_FOUND AND LibEdit_HAS_UNICODE)
18-
target_compile_definitions(swiftImmediate PRIVATE
19-
HAVE_LIBEDIT)
20-
target_link_libraries(swiftImmediate PRIVATE
21-
libedit)
22-
endif()

0 commit comments

Comments
 (0)