v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
message-handler.h
Go to the documentation of this file.
1// Copyright 2019 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_TORQUE_LS_MESSAGE_HANDLER_H_
6#define V8_TORQUE_LS_MESSAGE_HANDLER_H_
7
8#include "src/base/macros.h"
12
13namespace v8 {
14namespace internal {
15namespace torque {
16
17// A list of source Ids for which the LS provided diagnostic information
18// after the last compile. The LS is responsible for syncing diagnostic
19// information with the client. Before updated information can be sent,
20// old diagnostic messages have to be reset.
21DECLARE_CONTEXTUAL_VARIABLE(DiagnosticsFiles, std::vector<SourceId>);
22
23namespace ls {
24
25// The message handler might send responses or follow up requests.
26// To allow unit testing, the "sending" function is configurable.
27using MessageWriter = std::function<void(JsonValue)>;
28
30
31// Called when a compilation run finishes. Exposed for testability.
34
35} // namespace ls
36} // namespace torque
37} // namespace internal
38} // namespace v8
39
40#endif // V8_TORQUE_LS_MESSAGE_HANDLER_H_
#define DECLARE_CONTEXTUAL_VARIABLE(VarName,...)
Definition contextual.h:88
ZoneVector< RpoNumber > & result
std::function< void(JsonValue)> MessageWriter
void HandleMessage(JsonValue raw_message, MessageWriter writer)
void CompilationFinished(TorqueCompilerResult result, MessageWriter writer)
#define V8_EXPORT_PRIVATE
Definition macros.h:460