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
"
9
#include "
src/torque/ls/json.h
"
10
#include "
src/torque/source-positions.h
"
11
#include "
src/torque/torque-compiler.h
"
12
13
namespace
v8
{
14
namespace
internal
{
15
namespace
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.
21
DECLARE_CONTEXTUAL_VARIABLE
(DiagnosticsFiles, std::vector<SourceId>);
22
23
namespace
ls
{
24
25
// The message handler might send responses or follow up requests.
26
// To allow unit testing, the "sending" function is configurable.
27
using
MessageWriter
= std::function<void(
JsonValue
)>;
28
29
V8_EXPORT_PRIVATE
void
HandleMessage
(
JsonValue
raw_message,
MessageWriter
);
30
31
// Called when a compilation run finishes. Exposed for testability.
32
V8_EXPORT_PRIVATE
void
CompilationFinished
(
TorqueCompilerResult
result
,
33
MessageWriter
);
34
35
}
// namespace ls
36
}
// namespace torque
37
}
// namespace internal
38
}
// namespace v8
39
40
#endif
// V8_TORQUE_LS_MESSAGE_HANDLER_H_
DECLARE_CONTEXTUAL_VARIABLE
#define DECLARE_CONTEXTUAL_VARIABLE(VarName,...)
Definition
contextual.h:88
json.h
result
ZoneVector< RpoNumber > & result
Definition
jump-threading.cc:21
v8::internal::torque::ls::MessageWriter
std::function< void(JsonValue)> MessageWriter
Definition
message-handler.h:27
v8::internal::torque::ls::HandleMessage
void HandleMessage(JsonValue raw_message, MessageWriter writer)
Definition
message-handler.cc:349
v8::internal::torque::ls::CompilationFinished
void CompilationFinished(TorqueCompilerResult result, MessageWriter writer)
Definition
message-handler.cc:180
v8::internal::ls
@ ls
Definition
constants-arm.h:94
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
source-positions.h
macros.h
V8_EXPORT_PRIVATE
#define V8_EXPORT_PRIVATE
Definition
macros.h:460
v8::internal::torque::TorqueCompilerResult
Definition
torque-compiler.h:43
v8::internal::torque::ls::JsonValue
Definition
json.h:25
torque-compiler.h
src
torque
ls
message-handler.h
Generated on Sun Apr 6 2025 21:08:57 for v8 by
1.12.0