V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
builtins-call.cc
1 // Copyright 2016 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 #include "src/builtins/builtins-utils.h"
6 #include "src/builtins/builtins.h"
7 #include "src/handles-inl.h"
8 #include "src/isolate.h"
9 #include "src/objects-inl.h"
10 
11 namespace v8 {
12 namespace internal {
13 
14 Handle<Code> Builtins::CallFunction(ConvertReceiverMode mode) {
15  switch (mode) {
16  case ConvertReceiverMode::kNullOrUndefined:
17  return builtin_handle(kCallFunction_ReceiverIsNullOrUndefined);
18  case ConvertReceiverMode::kNotNullOrUndefined:
19  return builtin_handle(kCallFunction_ReceiverIsNotNullOrUndefined);
20  case ConvertReceiverMode::kAny:
21  return builtin_handle(kCallFunction_ReceiverIsAny);
22  }
23  UNREACHABLE();
24 }
25 
26 Handle<Code> Builtins::Call(ConvertReceiverMode mode) {
27  switch (mode) {
28  case ConvertReceiverMode::kNullOrUndefined:
29  return builtin_handle(kCall_ReceiverIsNullOrUndefined);
30  case ConvertReceiverMode::kNotNullOrUndefined:
31  return builtin_handle(kCall_ReceiverIsNotNullOrUndefined);
32  case ConvertReceiverMode::kAny:
33  return builtin_handle(kCall_ReceiverIsAny);
34  }
35  UNREACHABLE();
36 }
37 
38 } // namespace internal
39 } // namespace v8
Definition: libplatform.h:13