Commit 15495efe authored by Victor Gomes's avatar Victor Gomes Committed by Commit Bot

[Cleanup] Remove dead function

Change-Id: Iaee4c09124d77aa47fc968bb9e508af587d9e3ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1864830
Auto-Submit: Victor Gomes <victorgomes@google.com>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64324}
parent 5fbeb5c5
......@@ -52,34 +52,6 @@ void SloppyArgumentsElements::set_mapped_entry(uint32_t entry, Object object) {
set(entry + kParameterMapStart, object);
}
// TODO(danno): This shouldn't be inline here, but to defensively avoid
// regressions associated with the fix for the bug 778574, it's staying that way
// until the splice implementation in builtin-arrays.cc can be removed and this
// function can be moved into runtime-arrays.cc near its other usage.
bool JSSloppyArgumentsObject::GetSloppyArgumentsLength(Isolate* isolate,
Handle<JSObject> object,
int* out) {
Context context = *isolate->native_context();
Map map = object->map();
if (map != context.sloppy_arguments_map() &&
map != context.strict_arguments_map() &&
map != context.fast_aliased_arguments_map()) {
return false;
}
DCHECK(object->HasFastElements() || object->HasFastArgumentsElements());
Object len_obj =
object->InObjectPropertyAt(JSArgumentsObjectWithLength::kLengthIndex);
if (!len_obj.IsSmi()) return false;
*out = Max(0, Smi::ToInt(len_obj));
FixedArray parameters = FixedArray::cast(object->elements());
if (object->HasSloppyArgumentsElements()) {
FixedArray arguments = FixedArray::cast(parameters.get(1));
return *out <= arguments.length();
}
return *out <= parameters.length();
}
} // namespace internal
} // namespace v8
......
......@@ -56,10 +56,6 @@ class JSSloppyArgumentsObject : public JSArgumentsObjectWithLength {
// Indices of in-object properties.
static const int kCalleeIndex = kLengthIndex + 1;
inline static bool GetSloppyArgumentsLength(Isolate* isolate,
Handle<JSObject> object,
int* out);
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSSloppyArgumentsObject);
};
......
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