Commit 2f92faaf authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[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: 's avatarBen Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54899}
parent 0aed2067
......@@ -2,9 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/builtins/builtins-utils-inl.h"
#include "src/builtins/builtins.h"
#include "src/builtins/builtins-utils.h"
#include "src/code-factory.h"
#include "src/code-stub-assembler.h"
#include "src/contexts.h"
......
......@@ -2,9 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/builtins/builtins-utils-inl.h"
#include "src/builtins/builtins.h"
#include "src/builtins/builtins-utils.h"
#include "src/counters.h"
#include "src/objects-inl.h"
#include "src/objects/frame-array-inl.h"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/builtins/builtins-utils.h"
#include "src/builtins/builtins-utils-inl.h"
#include "src/builtins/builtins.h"
#include "src/objects-inl.h"
#include "src/objects/js-collection-inl.h"
......
......@@ -2,9 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/builtins/builtins-utils-inl.h"
#include "src/builtins/builtins.h"
#include "src/builtins/builtins-utils.h"
#include "src/counters.h"
#include "src/json-parser.h"
#include "src/json-stringifier.h"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/builtins/builtins-utils.h"
#include "src/builtins/builtins-utils-inl.h"
#include "src/builtins/builtins.h"
#include "src/code-factory.h"
#include "src/conversions.h"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/builtins/builtins-utils.h"
#include "src/builtins/builtins-utils-inl.h"
#include "src/builtins/builtins.h"
#include "src/code-factory.h"
#include "src/code-stub-assembler.h"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/builtins/builtins-utils.h"
#include "src/builtins/builtins-utils-inl.h"
#include "src/builtins/builtins.h"
#include "src/objects-inl.h"
......
......@@ -2,9 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/builtins/builtins-utils-inl.h"
#include "src/builtins/builtins.h"
#include "src/builtins/builtins-utils.h"
#include "src/counters.h"
#include "src/keys.h"
#include "src/lookup.h"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/builtins/builtins-utils.h"
#include "src/builtins/builtins-utils-inl.h"
#include "src/builtins/builtins.h"
#include "src/counters.h"
#include "src/objects-inl.h"
......
......@@ -5,7 +5,7 @@
#include "src/base/macros.h"
#include "src/base/platform/mutex.h"
#include "src/base/platform/time.h"
#include "src/builtins/builtins-utils.h"
#include "src/builtins/builtins-utils-inl.h"
#include "src/builtins/builtins.h"
#include "src/code-factory.h"
#include "src/conversions-inl.h"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/builtins/builtins-utils.h"
#include "src/builtins/builtins-utils-inl.h"
#include "src/builtins/builtins.h"
#include "src/conversions.h"
#include "src/counters.h"
......
......@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "src/api-inl.h"
#include "src/builtins/builtins-utils.h"
#include "src/builtins/builtins-utils-inl.h"
#include "src/builtins/builtins.h"
#include "src/counters.h"
#include "src/json-stringifier.h"
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/builtins/builtins-utils.h"
#include "src/builtins/builtins-utils-inl.h"
#include "src/builtins/builtins.h"
#include "src/counters.h"
#include "src/elements.h"
......
......@@ -12,6 +12,15 @@
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);
}
......
......@@ -34,23 +34,16 @@ class BuiltinArguments : public Arguments {
return Arguments::at<S>(index);
}
Handle<Object> atOrUndefined(Isolate* isolate, int index) {
if (index >= length()) {
return isolate->factory()->undefined_value();
}
return at<Object>(index);
}
Handle<Object> receiver() { return Arguments::at<Object>(0); }
static const int kNewTargetOffset = 0;
static const int kTargetOffset = 1;
static const int kArgcOffset = 2;
static const int kPaddingOffset = 3;
static constexpr int kNewTargetOffset = 0;
static constexpr int kTargetOffset = 1;
static constexpr int kArgcOffset = 2;
static constexpr int kPaddingOffset = 3;
static const int kNumExtraArgs = 4;
static const int kNumExtraArgsWithReceiver = 5;
static constexpr int kNumExtraArgs = 4;
static constexpr int kNumExtraArgsWithReceiver = 5;
inline Handle<Object> atOrUndefined(Isolate* isolate, int index);
inline Handle<Object> receiver();
inline Handle<JSFunction> target();
inline Handle<HeapObject> new_target();
......
......@@ -30,7 +30,6 @@ AUTO_EXCLUDE = [
'src/flag-definitions.h',
# blacklist of headers we need to fix (https://crbug.com/v8/7965).
'src/allocation-site-scopes.h',
'src/builtins/builtins-utils.h',
'src/compiler/allocation-builder.h',
'src/compiler/js-context-specialization.h',
'src/compiler/raw-machine-assembler.h',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment