builtins-interpreter-gen.cc 1.61 KB
Newer Older
1 2 3 4 5
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "src/builtins/builtins.h"
6
#include "src/codegen/macro-assembler.h"
7
#include "src/common/globals.h"
8 9 10 11

namespace v8 {
namespace internal {

12 13
void Builtins::Generate_InterpreterPushArgsThenCall(MacroAssembler* masm) {
  return Generate_InterpreterPushArgsThenCallImpl(
14
      masm, ConvertReceiverMode::kAny, InterpreterPushArgsMode::kOther);
15 16
}

17
void Builtins::Generate_InterpreterPushUndefinedAndArgsThenCall(
18
    MacroAssembler* masm) {
19
  return Generate_InterpreterPushArgsThenCallImpl(
20
      masm, ConvertReceiverMode::kNullOrUndefined,
21
      InterpreterPushArgsMode::kOther);
22 23
}

24 25 26
void Builtins::Generate_InterpreterPushArgsThenCallWithFinalSpread(
    MacroAssembler* masm) {
  return Generate_InterpreterPushArgsThenCallImpl(
27
      masm, ConvertReceiverMode::kAny,
28 29 30 31 32
      InterpreterPushArgsMode::kWithFinalSpread);
}

void Builtins::Generate_InterpreterPushArgsThenConstruct(MacroAssembler* masm) {
  return Generate_InterpreterPushArgsThenConstructImpl(
33 34 35
      masm, InterpreterPushArgsMode::kOther);
}

36
void Builtins::Generate_InterpreterPushArgsThenConstructWithFinalSpread(
37
    MacroAssembler* masm) {
38
  return Generate_InterpreterPushArgsThenConstructImpl(
39 40 41
      masm, InterpreterPushArgsMode::kWithFinalSpread);
}

42
void Builtins::Generate_InterpreterPushArgsThenConstructArrayFunction(
43
    MacroAssembler* masm) {
44
  return Generate_InterpreterPushArgsThenConstructImpl(
45
      masm, InterpreterPushArgsMode::kArrayFunction);
46 47 48 49
}

}  // namespace internal
}  // namespace v8