Home | History | Annotate | Download | only in builtins
      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_BUILTINS_BUILTINS_LAZY_GEN_H_
      6 #define V8_BUILTINS_BUILTINS_LAZY_GEN_H_
      7 
      8 #include "src/code-stub-assembler.h"
      9 
     10 namespace v8 {
     11 namespace internal {
     12 
     13 class LazyBuiltinsAssembler : public CodeStubAssembler {
     14  public:
     15   typedef JSTrampolineDescriptor Descriptor;
     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<Smi> 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_
     38