Commit 926b7b70 authored by Sathya Gunasekaran's avatar Sathya Gunasekaran Committed by Commit Bot

[globals] Remove unused arg from IsConstructable

Change-Id: Ib278d08768062c94b3a2f568f17984bb6761bc30
Reviewed-on: https://chromium-review.googlesource.com/461321Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44161}
parent 319d915c
......@@ -2378,8 +2378,8 @@ Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo(
Handle<String> name, FunctionKind kind, Handle<Code> code,
Handle<ScopeInfo> scope_info) {
DCHECK(IsValidFunctionKind(kind));
Handle<SharedFunctionInfo> shared = NewSharedFunctionInfo(
name, code, IsConstructable(kind, scope_info->language_mode()));
Handle<SharedFunctionInfo> shared =
NewSharedFunctionInfo(name, code, IsConstructable(kind));
shared->set_scope_info(*scope_info);
shared->set_outer_scope_info(*the_hole_value());
shared->set_kind(kind);
......
......@@ -1204,8 +1204,7 @@ inline bool IsClassConstructor(FunctionKind kind) {
return (kind & FunctionKind::kClassConstructor) != 0;
}
inline bool IsConstructable(FunctionKind kind, LanguageMode mode) {
inline bool IsConstructable(FunctionKind kind) {
if (IsAccessorFunction(kind)) return false;
if (IsConciseMethod(kind)) return false;
if (IsArrowFunction(kind)) return false;
......
......@@ -13656,7 +13656,7 @@ void SharedFunctionInfo::InitFromFunctionLiteral(
shared_info->set_uses_arguments(lit->scope()->arguments() != NULL);
shared_info->set_has_duplicate_parameters(lit->has_duplicate_parameters());
shared_info->set_kind(lit->kind());
if (!IsConstructable(lit->kind(), lit->language_mode())) {
if (!IsConstructable(lit->kind())) {
shared_info->SetConstructStub(
*shared_info->GetIsolate()->builtins()->ConstructedNonConstructable());
}
......
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