v8/src/builtins/builtins-utils-inl.h
Clemens Hammacher 2f92faaf26 [iwyu] Avoid use of inl methods in builtins-utils.h
Move them to builtins-utils-inl.h instead.

R=titzer@chromium.org

Bug: v8:8015, v8:7965
Change-Id: I692e5871e320896923bed5cc6a2efc609c793446
Reviewed-on: https://chromium-review.googlesource.com/1160845
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54899}
2018-08-03 13:18:56 +00:00

36 lines
978 B
C++

// Copyright 2018 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.
#ifndef V8_BUILTINS_BUILTINS_UTILS_INL_H_
#define V8_BUILTINS_BUILTINS_UTILS_INL_H_
#include "src/builtins/builtins-utils.h"
#include "src/arguments-inl.h"
namespace v8 {
namespace internal {
Handle<Object> BuiltinArguments::atOrUndefined(Isolate* isolate, int index) {
if (index >= length()) {
return isolate->factory()->undefined_value();
}
return at<Object>(index);
}
Handle<Object> BuiltinArguments::receiver() { return at<Object>(0); }
Handle<JSFunction> BuiltinArguments::target() {
return Arguments::at<JSFunction>(Arguments::length() - 1 - kTargetOffset);
}
Handle<HeapObject> BuiltinArguments::new_target() {
return Arguments::at<HeapObject>(Arguments::length() - 1 - kNewTargetOffset);
}
} // namespace internal
} // namespace v8
#endif // V8_BUILTINS_BUILTINS_UTILS_INL_H_