v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
builtins-utils-inl.h
Go to the documentation of this file.
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_UTILS_INL_H_
6
#define V8_BUILTINS_BUILTINS_UTILS_INL_H_
7
8
#include "
src/builtins/builtins-utils.h
"
9
// Include the non-inl header before the rest of the headers.
10
11
#include "
src/execution/arguments-inl.h
"
12
13
namespace
v8
{
14
namespace
internal
{
15
16
Handle<Object>
BuiltinArguments::atOrUndefined
(
Isolate
* isolate,
17
int
index)
const
{
18
if
(index >=
length
()) {
19
return
isolate->factory()->undefined_value();
20
}
21
return
at<Object>
(index);
22
}
23
24
Handle<JSAny>
BuiltinArguments::receiver
()
const
{
25
return
Handle<JSAny>
(
address_of_arg_at
(
kReceiverIndex
));
26
}
27
28
Handle<JSFunction>
BuiltinArguments::target
()
const
{
29
return
Handle<JSFunction>
(
address_of_arg_at
(
kTargetIndex
));
30
}
31
32
Handle<HeapObject>
BuiltinArguments::new_target
()
const
{
33
return
Handle<JSFunction>
(
address_of_arg_at
(
kNewTargetIndex
));
34
}
35
36
}
// namespace internal
37
}
// namespace v8
38
39
#endif
// V8_BUILTINS_BUILTINS_UTILS_INL_H_
builtins-utils.h
v8::internal::Arguments::address_of_arg_at
V8_INLINE Address * address_of_arg_at(int index) const
Definition
arguments.h:73
v8::internal::BuiltinArguments::kNewTargetIndex
static constexpr int kNewTargetIndex
Definition
builtins-utils.h:54
v8::internal::BuiltinArguments::target
Handle< JSFunction > target() const
Definition
builtins-utils-inl.h:28
v8::internal::BuiltinArguments::at
Handle< S > at(int index) const
Definition
builtins-utils.h:37
v8::internal::BuiltinArguments::length
int length() const
Definition
builtins-utils.h:78
v8::internal::BuiltinArguments::atOrUndefined
Handle< Object > atOrUndefined(Isolate *isolate, int index) const
Definition
builtins-utils-inl.h:16
v8::internal::BuiltinArguments::receiver
Handle< JSAny > receiver() const
Definition
builtins-utils-inl.h:24
v8::internal::BuiltinArguments::new_target
Handle< HeapObject > new_target() const
Definition
builtins-utils-inl.h:32
v8::internal::BuiltinArguments::kTargetIndex
static constexpr int kTargetIndex
Definition
builtins-utils.h:55
v8::internal::BuiltinArguments::kReceiverIndex
static constexpr int kReceiverIndex
Definition
builtins-utils.h:64
v8::internal::Handle
Definition
handles.h:149
v8::internal::Isolate
Definition
isolate.h:586
arguments-inl.h
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
v8::Handle
Local< T > Handle
Definition
v8-local-handle.h:621
src
builtins
builtins-utils-inl.h
Generated on Sun Apr 6 2025 21:08:50 for v8 by
1.12.0