diff --git a/src/codegen/code-stub-assembler.cc b/src/codegen/code-stub-assembler.cc index e138e8cc07..5ff9a1a31e 100644 --- a/src/codegen/code-stub-assembler.cc +++ b/src/codegen/code-stub-assembler.cc @@ -8058,7 +8058,7 @@ void CodeStubAssembler::TaggedToBigInt(TNode context, TVariable* var_bigint, TVariable* var_feedback) { Label done(this), is_smi(this), is_heapnumber(this), maybe_bigint64(this), - is_bigint(this), is_oddball(this); + is_bigint(this), is_oddball(this), is_true(this), is_false(this); GotoIf(TaggedIsSmi(value), &is_smi); TNode heap_object_value = CAST(value); TNode map = LoadMap(heap_object_value); @@ -8104,6 +8104,14 @@ void CodeStubAssembler::TaggedToBigInt(TNode context, Goto(if_bigint); BIND(&is_oddball); + Branch(IsTrue(value), &is_true, &is_false); + + BIND(&is_true); + *var_bigint = SmiConstant(1); + OverwriteFeedback(var_feedback, BinaryOperationFeedback::kNumberOrOddball); + Goto(if_bigint); + + BIND(&is_false); *var_bigint = SmiConstant(0); OverwriteFeedback(var_feedback, BinaryOperationFeedback::kNumberOrOddball); Goto(if_bigint);