[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}
This commit is contained in:
Clemens Hammacher 2018-08-03 14:36:11 +02:00 committed by Commit Bot
parent 0aed2067e4
commit 2f92faaf26
16 changed files with 30 additions and 33 deletions

View File

@ -2,9 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/builtins/builtins-utils-inl.h"
#include "src/builtins/builtins.h" #include "src/builtins/builtins.h"
#include "src/builtins/builtins-utils.h"
#include "src/code-factory.h" #include "src/code-factory.h"
#include "src/code-stub-assembler.h" #include "src/code-stub-assembler.h"
#include "src/contexts.h" #include "src/contexts.h"

View File

@ -2,9 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/builtins/builtins-utils-inl.h"
#include "src/builtins/builtins.h" #include "src/builtins/builtins.h"
#include "src/builtins/builtins-utils.h"
#include "src/counters.h" #include "src/counters.h"
#include "src/objects-inl.h" #include "src/objects-inl.h"
#include "src/objects/frame-array-inl.h" #include "src/objects/frame-array-inl.h"

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // 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/builtins/builtins.h"
#include "src/objects-inl.h" #include "src/objects-inl.h"
#include "src/objects/js-collection-inl.h" #include "src/objects/js-collection-inl.h"

View File

@ -2,9 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/builtins/builtins-utils-inl.h"
#include "src/builtins/builtins.h" #include "src/builtins/builtins.h"
#include "src/builtins/builtins-utils.h"
#include "src/counters.h" #include "src/counters.h"
#include "src/json-parser.h" #include "src/json-parser.h"
#include "src/json-stringifier.h" #include "src/json-stringifier.h"

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // 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/builtins/builtins.h"
#include "src/code-factory.h" #include "src/code-factory.h"
#include "src/conversions.h" #include "src/conversions.h"

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // 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/builtins/builtins.h"
#include "src/code-factory.h" #include "src/code-factory.h"
#include "src/code-stub-assembler.h" #include "src/code-stub-assembler.h"

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // 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/builtins/builtins.h"
#include "src/objects-inl.h" #include "src/objects-inl.h"

View File

@ -2,9 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "src/builtins/builtins-utils-inl.h"
#include "src/builtins/builtins.h" #include "src/builtins/builtins.h"
#include "src/builtins/builtins-utils.h"
#include "src/counters.h" #include "src/counters.h"
#include "src/keys.h" #include "src/keys.h"
#include "src/lookup.h" #include "src/lookup.h"

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // 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/builtins/builtins.h"
#include "src/counters.h" #include "src/counters.h"
#include "src/objects-inl.h" #include "src/objects-inl.h"

View File

@ -5,7 +5,7 @@
#include "src/base/macros.h" #include "src/base/macros.h"
#include "src/base/platform/mutex.h" #include "src/base/platform/mutex.h"
#include "src/base/platform/time.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/builtins/builtins.h"
#include "src/code-factory.h" #include "src/code-factory.h"
#include "src/conversions-inl.h" #include "src/conversions-inl.h"

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // 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/builtins/builtins.h"
#include "src/conversions.h" #include "src/conversions.h"
#include "src/counters.h" #include "src/counters.h"

View File

@ -3,7 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
#include "src/api-inl.h" #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/builtins/builtins.h"
#include "src/counters.h" #include "src/counters.h"
#include "src/json-stringifier.h" #include "src/json-stringifier.h"

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // 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/builtins/builtins.h"
#include "src/counters.h" #include "src/counters.h"
#include "src/elements.h" #include "src/elements.h"

View File

@ -12,6 +12,15 @@
namespace v8 { namespace v8 {
namespace internal { 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() { Handle<JSFunction> BuiltinArguments::target() {
return Arguments::at<JSFunction>(Arguments::length() - 1 - kTargetOffset); return Arguments::at<JSFunction>(Arguments::length() - 1 - kTargetOffset);
} }

View File

@ -34,23 +34,16 @@ class BuiltinArguments : public Arguments {
return Arguments::at<S>(index); return Arguments::at<S>(index);
} }
Handle<Object> atOrUndefined(Isolate* isolate, int index) { static constexpr int kNewTargetOffset = 0;
if (index >= length()) { static constexpr int kTargetOffset = 1;
return isolate->factory()->undefined_value(); static constexpr int kArgcOffset = 2;
} static constexpr int kPaddingOffset = 3;
return at<Object>(index);
}
Handle<Object> receiver() { return Arguments::at<Object>(0); } static constexpr int kNumExtraArgs = 4;
static constexpr int kNumExtraArgsWithReceiver = 5;
static const int kNewTargetOffset = 0;
static const int kTargetOffset = 1;
static const int kArgcOffset = 2;
static const int kPaddingOffset = 3;
static const int kNumExtraArgs = 4;
static const int kNumExtraArgsWithReceiver = 5;
inline Handle<Object> atOrUndefined(Isolate* isolate, int index);
inline Handle<Object> receiver();
inline Handle<JSFunction> target(); inline Handle<JSFunction> target();
inline Handle<HeapObject> new_target(); inline Handle<HeapObject> new_target();

View File

@ -30,7 +30,6 @@ AUTO_EXCLUDE = [
'src/flag-definitions.h', 'src/flag-definitions.h',
# blacklist of headers we need to fix (https://crbug.com/v8/7965). # blacklist of headers we need to fix (https://crbug.com/v8/7965).
'src/allocation-site-scopes.h', 'src/allocation-site-scopes.h',
'src/builtins/builtins-utils.h',
'src/compiler/allocation-builder.h', 'src/compiler/allocation-builder.h',
'src/compiler/js-context-specialization.h', 'src/compiler/js-context-specialization.h',
'src/compiler/raw-machine-assembler.h', 'src/compiler/raw-machine-assembler.h',