[builtin] Remove branch in Function.prototype.bind
Change-Id: I3d88cae4d4b74a091c776cb9a822d639ddb1e401 Reviewed-on: https://chromium-review.googlesource.com/712041 Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#48450}
This commit is contained in:
parent
247bc200d1
commit
9a3de971dd
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user