Skip to content

Commit 86f3f89

Browse files
16bit-ykikoclaude
andcommitted
style: remove all section divider comments across src/server/
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 408c1a6 commit 86f3f89

File tree

6 files changed

+0
-39
lines changed

6 files changed

+0
-39
lines changed

src/server/compiler.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,9 @@ class Compiler {
5858
llvm::DenseMap<std::uint32_t, Session>& sessions);
5959
~Compiler();
6060

61-
// ----- Module / compile graph (operates on Workspace) -----
6261

6362
void init_compile_graph();
6463

65-
// ----- Compile argument resolution -----
6664

6765
/// Fill compile arguments for a file (CDB lookup + header context fallback).
6866
/// @param session If non-null, used for header context resolution on open files.
@@ -71,13 +69,11 @@ class Compiler {
7169
std::vector<std::string>& arguments,
7270
Session* session = nullptr);
7371

74-
// ----- Pull-based compilation -----
7572

7673
/// Compile an open file's AST if dirty. On success, updates session's
7774
/// file_index, pch_ref, ast_deps, and publishes diagnostics.
7875
et::task<bool> ensure_compiled(Session& session);
7976

80-
// ----- Feature request forwarding to workers -----
8177

8278
using RawResult = et::task<et::serde::RawValue, et::ipc::Error>;
8379

src/server/indexer.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ namespace clice {
2121

2222
namespace lsp = eventide::ipc::lsp;
2323

24-
// -- Indexer: data management -------------------------------------------------
2524

2625
void Indexer::merge(const void* tu_index_data, std::size_t size) {
2726
auto tu_index = index::TUIndex::from(tu_index_data);
@@ -183,7 +182,6 @@ bool Indexer::need_update(llvm::StringRef file_path) {
183182
return merged_it->second.index.need_update(path_mapping);
184183
}
185184

186-
// -- Indexer: symbol queries --------------------------------------------------
187185

188186
bool Indexer::find_symbol_info(index::SymbolHash hash, std::string& name, SymbolKind& kind) const {
189187
for(auto& [_, session]: sessions) {
@@ -369,7 +367,6 @@ std::optional<SymbolInfo>
369367
return lookup_symbol(uri, path, range.start, session);
370368
}
371369

372-
// -- Indexer: relation collection helpers --------------------------------------
373370

374371
void Indexer::collect_grouped_relations(
375372
index::SymbolHash hash,
@@ -436,7 +433,6 @@ void Indexer::collect_unique_targets(index::SymbolHash hash,
436433
}
437434
}
438435

439-
// -- Indexer: hierarchy queries ------------------------------------------------
440436

441437
/// Resolve a symbol hash into a SymbolInfo with definition location.
442438
/// Returns nullopt if the symbol or its definition cannot be found.
@@ -581,7 +577,6 @@ std::vector<protocol::SymbolInformation> Indexer::search_symbols(llvm::StringRef
581577
return results;
582578
}
583579

584-
// -- Indexer: static utilities ------------------------------------------------
585580

586581
protocol::SymbolKind Indexer::to_lsp_symbol_kind(SymbolKind kind) {
587582
switch(kind) {

src/server/master_server.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,7 @@ void MasterServer::register_handlers() {
362362
}());
363363
});
364364

365-
/// ---------------------------------------------------------------
366365
/// Document lifecycle — handled directly by MasterServer.
367-
/// ---------------------------------------------------------------
368366

369367
peer.on_notification([this](const protocol::DidOpenTextDocumentParams& params) {
370368
if(lifecycle != ServerLifecycle::Ready)
@@ -482,9 +480,7 @@ void MasterServer::register_handlers() {
482480
LOG_DEBUG("didSave: {}", path);
483481
});
484482

485-
/// ---------------------------------------------------------------
486483
/// Feature requests — stateful forwarding.
487-
/// ---------------------------------------------------------------
488484

489485
peer.on_request([this](RequestContext& ctx, const protocol::HoverParams& params) -> RawResult {
490486
auto path = uri_to_path(params.text_document_position_params.text_document.uri);
@@ -592,9 +588,7 @@ void MasterServer::register_handlers() {
592588
return indexer.resolve_hierarchy_item(uri, path, range, data, session);
593589
};
594590

595-
/// ---------------------------------------------------------------
596591
/// Feature requests — index-based with AST fallback.
597-
/// ---------------------------------------------------------------
598592

599593
peer.on_request([this, query_at](RequestContext& ctx,
600594
const protocol::DefinitionParams& params) -> RawResult {
@@ -650,9 +644,7 @@ void MasterServer::register_handlers() {
650644
co_return serde_raw{"null"};
651645
});
652646

653-
/// ---------------------------------------------------------------
654647
/// Feature requests — stateless forwarding.
655-
/// ---------------------------------------------------------------
656648

657649
peer.on_request([this](RequestContext& ctx,
658650
const protocol::CompletionParams& params) -> RawResult {
@@ -677,9 +669,7 @@ void MasterServer::register_handlers() {
677669
sit->second);
678670
});
679671

680-
/// ---------------------------------------------------------------
681672
/// Hierarchy queries — index-based.
682-
/// ---------------------------------------------------------------
683673

684674
peer.on_request(
685675
[this, lookup_at](RequestContext& ctx,
@@ -772,9 +762,7 @@ void MasterServer::register_handlers() {
772762
co_return to_raw(results);
773763
});
774764

775-
/// ---------------------------------------------------------------
776765
/// clice/ extension commands.
777-
/// ---------------------------------------------------------------
778766

779767
peer.on_request(
780768
"clice/queryContext",

src/server/session.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@ namespace et = eventide;
2626
/// Sessions may READ from Workspace (e.g. to obtain PCH/PCM paths, module
2727
/// mappings, include graph) but all compilation results stay here.
2828
struct Session {
29-
// ----- Identity -----
3029

3130
/// Path ID of this file in PathPool. Set on creation, never changes.
3231
std::uint32_t path_id = 0;
3332

34-
// ----- Document state (from LSP) -----
3533

3634
/// LSP document version, incremented by the client on each edit.
3735
int version = 0;
@@ -56,7 +54,6 @@ struct Session {
5654

5755
std::shared_ptr<PendingCompile> compiling;
5856

59-
// ----- Compilation artifacts (per-file, references Workspace caches) -----
6057

6158
/// Reference to the PCH entry in Workspace.pch_cache, if any.
6259
/// The PCH itself is owned by Workspace (shared, content-addressed);
@@ -73,7 +70,6 @@ struct Session {
7370
/// Used for two-layer staleness detection (mtime + content hash).
7471
std::optional<DepsSnapshot> ast_deps;
7572

76-
// ----- Header context (only meaningful for header files) -----
7773

7874
/// Compilation context for header files that lack their own CDB entry.
7975
/// Stores the host source file and synthesized preamble for this header.
@@ -83,7 +79,6 @@ struct Session {
8379
/// When set, overrides automatic header context resolution.
8480
std::optional<std::uint32_t> active_context;
8581

86-
// ----- Index (per-file, not merged into Workspace) -----
8782

8883
/// Symbol index built from the latest compilation of this file's buffer.
8984
/// Used for queries (hover, goto, references) on this file.

src/server/workspace.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ const static index::Occurrence* lookup_occurrence(const std::vector<index::Occur
3535
return best;
3636
}
3737

38-
// -- OpenFileIndex ------------------------------------------------------------
3938

4039
std::optional<std::pair<index::SymbolHash, protocol::Range>>
4140
OpenFileIndex::find_occurrence(std::uint32_t offset) const {
@@ -54,7 +53,6 @@ std::optional<std::pair<index::SymbolHash, protocol::Range>>
5453
};
5554
}
5655

57-
// -- MergedIndexShard ---------------------------------------------------------
5856

5957
std::optional<std::pair<index::SymbolHash, protocol::Range>>
6058
MergedIndexShard::find_occurrence(std::uint32_t offset) const {
@@ -76,7 +74,6 @@ std::optional<std::pair<index::SymbolHash, protocol::Range>>
7674
return result;
7775
}
7876

79-
// -- Workspace ----------------------------------------------------------------
8077

8178
llvm::SmallVector<std::uint32_t> Workspace::on_file_saved(std::uint32_t path_id) {
8279
llvm::SmallVector<std::uint32_t> dirtied;
@@ -98,7 +95,6 @@ void Workspace::on_file_closed(std::uint32_t path_id) {
9895
pch_cache.erase(path_id);
9996
}
10097

101-
// -- Free helper functions (used by Workspace and Compiler) -------------------
10298

10399
std::uint64_t hash_file(llvm::StringRef path) {
104100
auto buf = llvm::MemoryBuffer::getFile(path);
@@ -145,7 +141,6 @@ bool deps_changed(const PathPool& pool, const DepsSnapshot& snap) {
145141
return false;
146142
}
147143

148-
// -- Cache persistence structs ------------------------------------------------
149144

150145
namespace {
151146

@@ -179,7 +174,6 @@ struct CacheData {
179174

180175
} // namespace
181176

182-
// -- Workspace cache / module methods -----------------------------------------
183177

184178
void Workspace::load_cache() {
185179
if(config.cache_dir.empty())

src/server/workspace.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,16 +171,13 @@ struct PCMState {
171171
/// Sessions (open files) may READ from Workspace but must not WRITE to it
172172
/// except through the didSave path.
173173
struct Workspace {
174-
// ----- Configuration -----
175174

176175
CliceConfig config;
177176
CompilationDatabase cdb;
178177

179-
// ----- Path management -----
180178

181179
PathPool path_pool;
182180

183-
// ----- Dependency graphs -----
184181

185182
/// Include relationships between files on disk (#include edges).
186183
/// Built once at startup from CDB scan; updated incrementally on didSave.
@@ -195,7 +192,6 @@ struct Workspace {
195192
/// declarations change.
196193
llvm::DenseMap<std::uint32_t, std::string> path_to_module;
197194

198-
// ----- Compilation caches (shared, content-addressed) -----
199195

200196
/// PCH cache, keyed by file path_id. Content-addressed by preamble hash,
201197
/// so different files with identical preambles share the same PCH.
@@ -209,7 +205,6 @@ struct Workspace {
209205
/// Maps to the .pcm file on disk used as -fmodule-file argument.
210206
llvm::DenseMap<std::uint32_t, std::string> pcm_paths;
211207

212-
// ----- Symbol index (disk-derived) -----
213208

214209
/// Global symbol table across all indexed translation units.
215210
index::ProjectIndex project_index;
@@ -219,7 +214,6 @@ struct Workspace {
219214
/// for position mapping.
220215
llvm::DenseMap<std::uint32_t, MergedIndexShard> merged_indices;
221216

222-
// ----- Lifecycle methods -----
223217

224218
/// Called when a file is saved to disk. Cascades invalidation through
225219
/// compile_graph and clears affected PCM caches.
@@ -230,7 +224,6 @@ struct Workspace {
230224
/// is a module unit so dependents can be re-evaluated on next compile.
231225
void on_file_closed(std::uint32_t path_id);
232226

233-
// ----- Cache / module methods (moved from Compiler) -----
234227

235228
/// Load PCH/PCM cache from cache.json on disk.
236229
void load_cache();

0 commit comments

Comments
 (0)