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_ARGUMENTS_INL_H_
6#define V8_ARGUMENTS_INL_H_
7
8#include "src/arguments.h"
9
10#include "src/handles-inl.h"
11#include "src/objects-inl.h" // TODO(jkummerow): Just smi-inl.h.
12
13namespace v8 {
14namespace internal {
15
16template <class S>
17Handle<S> Arguments::at(int index) {
18 return Handle<S>::cast(at<Object>(index));
19}
20
21int Arguments::smi_at(int index) {
22 return Smi::ToInt(Object(*address_of_arg_at(index)));
23}
24
25double Arguments::number_at(int index) { return (*this)[index]->Number(); }
26
27} // namespace internal
28} // namespace v8
29
30#endif // V8_ARGUMENTS_INL_H_
31