Commit 306f2fd5 authored by Mathias Bynens's avatar Mathias Bynens Committed by Commit Bot

[builtins] Remove BigIntConstructor_ConstructStub builtin

This brings us closer to our goal of deprecating the `construct_stub`
field in `SharedFunctionInfo`.

Bug: v8:7503
Change-Id: I215539fb8ac52fd437d3c04a02ecba2cd38cd101
Reviewed-on: https://chromium-review.googlesource.com/940125Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51627}
parent df5483ca
......@@ -4369,7 +4369,7 @@ void Genesis::InitializeGlobal_harmony_bigint() {
bigint_fun->shared()->set_builtin_function_id(kBigIntConstructor);
bigint_fun->shared()->DontAdaptArguments();
bigint_fun->shared()->SetConstructStub(
*BUILTIN_CODE(isolate(), BigIntConstructor_ConstructStub));
*BUILTIN_CODE(isolate(), JSBuiltinsConstructStub));
bigint_fun->shared()->set_length(1);
InstallWithIntrinsicDefaultProto(isolate(), bigint_fun,
Context::BIGINT_FUNCTION_INDEX);
......
......@@ -13,6 +13,7 @@ namespace internal {
BUILTIN(BigIntConstructor) {
HandleScope scope(isolate);
if (args.new_target()->IsUndefined(isolate)) { // [[Call]]
Handle<Object> value = args.atOrUndefined(isolate, 1);
if (value->IsJSReceiver()) {
......@@ -27,13 +28,11 @@ BUILTIN(BigIntConstructor) {
} else {
RETURN_RESULT_OR_FAILURE(isolate, BigInt::FromObject(isolate, value));
}
}
BUILTIN(BigIntConstructor_ConstructStub) {
HandleScope scope(isolate);
} else { // [[Construct]]
THROW_NEW_ERROR_RETURN_FAILURE(
isolate, NewTypeError(MessageTemplate::kNotConstructor,
isolate->factory()->BigInt_string()));
}
}
BUILTIN(BigIntAsUintN) {
......
......@@ -374,7 +374,6 @@ namespace internal {
\
/* BigInt */ \
CPP(BigIntConstructor) \
CPP(BigIntConstructor_ConstructStub) \
CPP(BigIntAsUintN) \
CPP(BigIntAsIntN) \
CPP(BigIntPrototypeToLocaleString) \
......
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