v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
pending-optimization-table.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_CODEGEN_PENDING_OPTIMIZATION_TABLE_H_
6#define V8_CODEGEN_PENDING_OPTIMIZATION_TABLE_H_
7
9
10namespace v8 {
11namespace internal {
12
13class IsCompiledScope;
14
15// This class adds the functionality to properly test the optimized code. This
16// is only for use in tests. All these functions should only be called when
17// testing_d8_flag_for_tests is set.
19 public:
20 // This function should be called before we mark the function for
21 // optimization. It should be called when |function| is already compiled and
22 // has a feedback vector allocated, and it blocks heuristic optimization.
23 //
24 // This also holds on to the bytecode strongly, preventing the bytecode from
25 // being flushed.
27 Isolate* isolate, DirectHandle<JSFunction> function,
28 IsCompiledScope* is_compiled_scope);
29
30 // Returns true if MarkFunctionForManualOptimization was called with this
31 // function.
32 static bool IsMarkedForManualOptimization(Isolate* isolate,
33 Tagged<JSFunction> function);
34};
35
36} // namespace internal
37} // namespace v8
38
39#endif // V8_CODEGEN_PENDING_OPTIMIZATION_TABLE_H_
static void MarkFunctionForManualOptimization(Isolate *isolate, DirectHandle< JSFunction > function, IsCompiledScope *is_compiled_scope)
static bool IsMarkedForManualOptimization(Isolate *isolate, Tagged< JSFunction > function)