v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
arguments-inl.h
Go to the documentation of this file.
1// Copyright 2017 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_OBJECTS_ARGUMENTS_INL_H_
6#define V8_OBJECTS_ARGUMENTS_INL_H_
7
9// Include the non-inl header before the rest of the headers.
10
15
16// Has to be the last include (doesn't have include guards):
18
19namespace v8 {
20namespace internal {
21
22#include "torque-generated/src/objects/arguments-tq-inl.inc"
23
24TQ_OBJECT_CONSTRUCTORS_IMPL(JSArgumentsObject)
25TQ_OBJECT_CONSTRUCTORS_IMPL(AliasedArgumentsEntry)
26
28 return context_.load();
29}
31 WriteBarrierMode mode) {
32 context_.store(this, value, mode);
33}
36 return arguments_.load();
37}
43
45 int index, RelaxedLoadTag tag) const {
46 DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
47 return objects()[index].Relaxed_Load();
48}
49
51 int index, Tagged<UnionOf<Smi, Hole>> value) {
52 DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
53 objects()[index].store(this, value);
54}
55
57 int index, Tagged<UnionOf<Smi, Hole>> value, RelaxedStoreTag tag) {
58 DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
59 objects()[index].Relaxed_Store(this, value);
60}
61
62} // namespace internal
63} // namespace v8
64
66
67#endif // V8_OBJECTS_ARGUMENTS_INL_H_
Address * arguments_
void set_arguments(Tagged< UnionOf< FixedArray, NumberDictionary > > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
void set_mapped_entries(int index, Tagged< UnionOf< Smi, Hole > > value)
void set_context(Tagged< Context > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
Tagged< UnionOf< FixedArray, NumberDictionary > > arguments() const
Tagged< UnionOf< Smi, Hole > > mapped_entries(int index, RelaxedLoadTag) const
Handle< Context > context_
typename detail::FlattenUnionHelper< Union<>, Ts... >::type UnionOf
Definition union.h:123
#define TQ_OBJECT_CONSTRUCTORS_IMPL(Type)
#define DCHECK_LT(v1, v2)
Definition logging.h:489