Commit ed9b10c3 authored by tzik's avatar tzik Committed by Commit Bot

Remove unused has_prototype_slot parameter on FunctionMapIndex

has_prototype_slot on Context::FunctionMapIndex() is unused in its
implementation, and all callers passes just true.
Whether the function has prototype or not is determined by FunctionKind
instead.

Change-Id: I598515b25267dd3470cccbf3236b5e64c6959d00
Reviewed-on: https://chromium-review.googlesource.com/c/1469542Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59584}
parent d3cf03c6
......@@ -165,8 +165,7 @@ NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSORS)
CHECK_FOLLOWS2(v3, v4)
int Context::FunctionMapIndex(LanguageMode language_mode, FunctionKind kind,
bool has_prototype_slot, bool has_shared_name,
bool needs_home_object) {
bool has_shared_name, bool needs_home_object) {
if (IsClassConstructor(kind)) {
// Like the strict function map, but with no 'name' accessor. 'name'
// needs to be the last property and it is added during instantiation,
......
......@@ -642,8 +642,7 @@ class Context : public HeapObject {
bool* is_sloppy_function_name = nullptr);
static inline int FunctionMapIndex(LanguageMode language_mode,
FunctionKind kind, bool has_prototype_slot,
bool has_shared_name,
FunctionKind kind, bool has_shared_name,
bool needs_home_object);
static int ArrayMapIndex(ElementsKind elements_kind) {
......
......@@ -1098,7 +1098,7 @@ void SharedFunctionInfo::SharedFunctionInfoVerify(Isolate* isolate) {
}
int expected_map_index = Context::FunctionMapIndex(
language_mode(), kind(), true, HasSharedName(), needs_home_object());
language_mode(), kind(), HasSharedName(), needs_home_object());
CHECK_EQ(expected_map_index, function_map_index());
if (scope_info()->length() > 0) {
......
......@@ -321,7 +321,7 @@ void SharedFunctionInfo::clear_padding() {
void SharedFunctionInfo::UpdateFunctionMapIndex() {
int map_index = Context::FunctionMapIndex(
language_mode(), kind(), true, HasSharedName(), needs_home_object());
language_mode(), kind(), HasSharedName(), needs_home_object());
set_function_map_index(map_index);
}
......
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