Commit 9a3de971 authored by Camillo Bruni's avatar Camillo Bruni Committed by Commit Bot

[builtin] Remove branch in Function.prototype.bind

Change-Id: I3d88cae4d4b74a091c776cb9a822d639ddb1e401
Reviewed-on: https://chromium-review.googlesource.com/712041Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48450}
parent 247bc200
......@@ -28,13 +28,12 @@ TF_BUILTIN(FastFunctionPrototypeBind, CodeStubAssembler) {
Node* receiver_map = LoadMap(receiver);
{
Label fast(this);
Node* instance_type = LoadMapInstanceType(receiver_map);
GotoIf(Word32Equal(instance_type, Int32Constant(JS_FUNCTION_TYPE)), &fast);
GotoIf(Word32Equal(instance_type, Int32Constant(JS_BOUND_FUNCTION_TYPE)),
&fast);
Goto(&slow);
BIND(&fast);
GotoIfNot(
Word32Or(
Word32Equal(instance_type, Int32Constant(JS_FUNCTION_TYPE)),
Word32Equal(instance_type, Int32Constant(JS_BOUND_FUNCTION_TYPE))),
&slow);
}
// Disallow binding of slow-mode functions. We need to figure out whether the
......
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