V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
preparser-logger.h
1 // Copyright 2018 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_PARSING_PREPARSER_LOGGER_H_
6 #define V8_PARSING_PREPARSER_LOGGER_H_
7 
8 namespace v8 {
9 namespace internal {
10 
11 class PreParserLogger final {
12  public:
13  PreParserLogger() : end_(-1), num_parameters_(-1), num_inner_functions_(-1) {}
14 
15  void LogFunction(int end, int num_parameters, int num_inner_functions) {
16  end_ = end;
17  num_parameters_ = num_parameters;
18  num_inner_functions_ = num_inner_functions;
19  }
20 
21  int end() const { return end_; }
22  int num_parameters() const { return num_parameters_; }
23  int num_inner_functions() const { return num_inner_functions_; }
24 
25  private:
26  int end_;
27  // For function entries.
28  int num_parameters_;
29  int num_inner_functions_;
30 };
31 
32 } // namespace internal
33 } // namespace v8.
34 
35 #endif // V8_PARSING_PREPARSER_LOGGER_H_
Definition: libplatform.h:13