blob: b51dcb58d45395b79646a8ee76209b10c776950b [file] [log] [blame]
Rubin Xu7bc1b612021-02-16 09:38:50 +00001// 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_BUILTINS_BUILTINS_LAZY_GEN_H_
6#define V8_BUILTINS_BUILTINS_LAZY_GEN_H_
7
8#include "src/codegen/code-stub-assembler.h"
9
10namespace v8 {
11namespace internal {
12
13class LazyBuiltinsAssembler : public CodeStubAssembler {
14 public:
15 using Descriptor = JSTrampolineDescriptor;
16
17 explicit LazyBuiltinsAssembler(compiler::CodeAssemblerState* state)
18 : CodeStubAssembler(state) {}
19
20 void GenerateTailCallToJSCode(TNode<Code> code, TNode<JSFunction> function);
21
22 void GenerateTailCallToReturnedCode(Runtime::FunctionId function_id,
23 TNode<JSFunction> function);
24 void TailCallRuntimeIfMarkerEquals(TNode<Uint32T> marker,
25 OptimizationMarker expected_marker,
26 Runtime::FunctionId function_id,
27 TNode<JSFunction> function);
28
29 void MaybeTailCallOptimizedCodeSlot(TNode<JSFunction> function,
30 TNode<FeedbackVector> feedback_vector);
31 void CompileLazy(TNode<JSFunction> function);
32};
33
34} // namespace internal
35} // namespace v8
36
37#endif // V8_BUILTINS_BUILTINS_LAZY_GEN_H_