161 if (
m.right().HasResolvedValue() &&
m.right().Ref(
broker).IsString()) {
165 if (
m.left().HasResolvedValue() &&
m.left().Ref(
broker).IsString()) {
216 if (!
left_type().
Is(Type::ReceiverOrNullOrUndefined())) {
219 if (!
right_type().
Is(Type::ReceiverOrNullOrUndefined())) {
275 if (!
left_type().
Is(Type::StringOrStringWrapper())) {
339 if (
node_->
op()->EffectInputCount() > 0) {
399 case IrOpcode::kJSAdd:
401 case IrOpcode::kJSSubtract:
403 case IrOpcode::kJSMultiply:
405 case IrOpcode::kJSDivide:
407 case IrOpcode::kJSModulus:
409 case IrOpcode::kJSExponentiate:
411 case IrOpcode::kJSBitwiseAnd:
413 case IrOpcode::kJSBitwiseOr:
415 case IrOpcode::kJSBitwiseXor:
417 case IrOpcode::kJSShiftLeft:
419 case IrOpcode::kJSShiftRight:
421 case IrOpcode::kJSShiftRightLogical:
479 if (reduction.Changed())
return reduction.
replacement();
490 if (!type.Is(Type::Signed32())) {
495 if (!type.Is(Type::Unsigned32())) {
524 pointer_comparable_type_(
535 if (input_type.
Is(Type::PlainPrimitive())) {
538 node->InsertInput(
graph()->zone(), 1,
jsgraph()->SmiConstant(-1));
541 r.ConvertInputsToNumber();
543 return r.ChangeToPureOperator(
r.NumberOp(), Type::Signed32());
551 if (input_type.
Is(Type::PlainPrimitive())) {
554 node->InsertInput(
graph()->zone(), 1,
jsgraph()->OneConstant());
557 r.ConvertInputsToNumber();
559 return r.ChangeToPureOperator(
r.NumberOp(), Type::Number());
567 if (input_type.
Is(Type::PlainPrimitive())) {
570 node->InsertInput(
graph()->zone(), 1,
jsgraph()->OneConstant());
573 r.ConvertInputsToNumber();
575 return r.ChangeToPureOperator(
r.NumberOp(), Type::Number());
583 if (input_type.
Is(Type::PlainPrimitive())) {
586 node->InsertInput(
graph()->zone(), 1,
jsgraph()->SmiConstant(-1));
589 r.ConvertInputsToNumber();
590 return r.ChangeToPureOperator(
r.NumberOp(), Type::Number());
597 Node** effect,
Node** control,
bool should_create_cons_string) {
608 if (string_length_protector.
value(
broker()).AsSmi() ==
626 Node* efalse = *effect;
631 context, frame_state, efalse, if_false);
635 Node* on_exception =
nullptr;
640 Revisit(on_exception);
652 length, *effect, *control);
657 Operator const*
const op = should_create_cons_string
661 ReplaceWithValue(node, value, *effect, *control);
662 return Replace(value);
672 Node* etrue = *effect;
673 Node* vtrue = string_or_wrapper;
680 Node* efalse = *effect;
684 string_or_wrapper, *effect, *control);
688 vfalse, efalse, if_false);
694 vtrue, vfalse, *control);
699 if (
r.BothInputsAre(Type::Number())) {
701 return r.ChangeToPureOperator(
simplified()->NumberAdd(), Type::Number());
703 if (
r.BothInputsAre(Type::PlainPrimitive()) &&
704 r.NeitherInputCanBe(Type::StringOrReceiver())) {
706 r.ConvertInputsToNumber();
707 return r.ChangeToPureOperator(
simplified()->NumberAdd(), Type::Number());
711 if (
r.LeftInputIs(Type::String())) {
714 if (reduction.Changed()) {
717 }
else if (
r.RightInputIs(Type::String())) {
720 if (reduction.Changed()) {
728 bool can_inline_string_wrapper_add =
false;
732 r.CheckInputsToString();
733 }
else if (
r.GetBinaryOperationHint(node) ==
735 can_inline_string_wrapper_add =
737 if (can_inline_string_wrapper_add) {
738 r.CheckInputsToStringOrStringWrapper();
745 if (
r.BothInputsAre(Type::Primitive())) {
769 if (
r.BothInputsAre(Type::String())) {
771 frame_state, &effect, &control,
772 r.ShouldCreateConsString());
773 }
else if (
r.BothInputsAre(Type::StringOrStringWrapper()) &&
774 can_inline_string_wrapper_add) {
783 frame_state, &effect, &control,
false);
788 if (
r.OneInputIs(Type::String())) {
790 if (!
r.LeftInputIs(Type::String())) {
792 }
else if (!
r.RightInputIs(Type::String())) {
796 if (
r.NeitherInputCanBe(Type::Receiver())) {
811 node->RemoveInput(JSAddNode::FeedbackVectorIndex());
812 node->InsertInput(
graph()->zone(), 0,
815 return Changed(node);
822 if (
r.BothInputsAre(Type::PlainPrimitive())) {
823 r.ConvertInputsToNumber();
824 return r.ChangeToPureOperator(
r.NumberOp(), Type::Number());
831 if (
r.BothInputsAre(Type::PlainPrimitive())) {
832 r.ConvertInputsToNumber();
834 return r.ChangeToPureOperator(
r.NumberOp(), Type::Signed32());
841 if (
r.BothInputsAre(Type::PlainPrimitive())) {
842 r.ConvertInputsToNumber();
844 return r.ChangeToPureOperator(
r.NumberOp(), signedness ==
kUnsigned
853 if (
r.BothInputsAre(Type::String())) {
856 switch (node->opcode()) {
857 case IrOpcode::kJSLessThan:
860 case IrOpcode::kJSGreaterThan:
864 case IrOpcode::kJSLessThanOrEqual:
867 case IrOpcode::kJSGreaterThanOrEqual:
874 r.ChangeToPureOperator(stringOp);
875 return Changed(node);
880 if (
r.BothInputsAre(Type::Signed32()) ||
881 r.BothInputsAre(Type::Unsigned32())) {
884 }
else if (
r.OneInputCannotBe(Type::StringOrReceiver()) &&
885 r.BothInputsAre(Type::PlainPrimitive())) {
886 r.ConvertInputsToNumber();
889 }
else if (
r.IsStringCompareOperation()) {
890 r.CheckInputsToString();
897 switch (node->opcode()) {
898 case IrOpcode::kJSLessThan:
899 comparison = less_than;
901 case IrOpcode::kJSGreaterThan:
902 comparison = less_than;
905 case IrOpcode::kJSLessThanOrEqual:
906 comparison = less_than_or_equal;
908 case IrOpcode::kJSGreaterThanOrEqual:
909 comparison = less_than_or_equal;
915 return r.ChangeToPureOperator(comparison);
921 if (
r.BothInputsAre(Type::UniqueName())) {
922 return r.ChangeToPureOperator(
simplified()->ReferenceEqual());
924 if (
r.IsInternalizedStringCompareOperation()) {
925 r.CheckInputsToInternalizedString();
926 return r.ChangeToPureOperator(
simplified()->ReferenceEqual());
928 if (
r.BothInputsAre(Type::String())) {
929 return r.ChangeToPureOperator(
simplified()->StringEqual());
931 if (
r.BothInputsAre(Type::Boolean())) {
932 return r.ChangeToPureOperator(
simplified()->ReferenceEqual());
934 if (
r.BothInputsAre(Type::Receiver())) {
935 return r.ChangeToPureOperator(
simplified()->ReferenceEqual());
937 if (
r.OneInputIs(Type::NullOrUndefined())) {
938 RelaxEffectsAndControls(node);
939 node->RemoveInput(
r.LeftInputIs(Type::NullOrUndefined()) ? 0 : 1);
940 node->TrimInputCount(1);
942 return Changed(node);
945 if (
r.BothInputsAre(Type::Signed32()) ||
946 r.BothInputsAre(Type::Unsigned32())) {
947 return r.ChangeToPureOperator(
simplified()->NumberEqual());
948 }
else if (
r.BothInputsAre(Type::Number())) {
949 return r.ChangeToPureOperator(
simplified()->NumberEqual());
950 }
else if (
r.IsReceiverCompareOperation()) {
951 r.CheckInputsToReceiver();
952 return r.ChangeToPureOperator(
simplified()->ReferenceEqual());
953 }
else if (
r.IsReceiverOrNullOrUndefinedCompareOperation()) {
955 r.CheckInputsToReceiverOrNullOrUndefined();
960 if (
r.OneInputIs(Type::DetectableReceiver())) {
961 return r.ChangeToPureOperator(
simplified()->ReferenceEqual());
983 __ GotoIf(
__ ReferenceEqual(lhs,
__ UndefinedConstant()),
984 &check_undetectable, rhs);
985 __ GotoIf(
__ ReferenceEqual(lhs,
__ NullConstant()), &check_undetectable,
987 __ GotoIf(
__ ReferenceEqual(rhs,
__ UndefinedConstant()),
988 &check_undetectable, lhs);
989 __ GotoIf(
__ ReferenceEqual(rhs,
__ NullConstant()), &check_undetectable,
991 __ Goto(&done,
__ ReferenceEqual(lhs, rhs));
993 __ Bind(&check_undetectable);
995 __ ObjectIsUndetectable(check_undetectable.PhiAt<
Object>(0)));
998 Node* value = done.PhiAt(0);
999 ReplaceWithValue(node, value, gasm.
effect(), gasm.
control());
1000 return Replace(value);
1002 }
else if (
r.IsStringCompareOperation()) {
1003 r.CheckInputsToString();
1004 return r.ChangeToPureOperator(
simplified()->StringEqual());
1005 }
else if (
r.IsSymbolCompareOperation()) {
1006 r.CheckInputsToSymbol();
1007 return r.ChangeToPureOperator(
simplified()->ReferenceEqual());
1014 if (
r.type().IsSingleton()) {
1018 if (
r.left() ==
r.right()) {
1024 ReplaceWithValue(node, replacement);
1025 return Replace(replacement);
1028 if (
r.BothInputsAre(Type::Unique())) {
1029 return r.ChangeToPureOperator(
simplified()->ReferenceEqual());
1032 return r.ChangeToPureOperator(
simplified()->ReferenceEqual());
1034 if (
r.IsInternalizedStringCompareOperation()) {
1035 r.CheckInputsToInternalizedString();
1036 return r.ChangeToPureOperator(
simplified()->ReferenceEqual());
1038 if (
r.BothInputsAre(Type::String())) {
1039 return r.ChangeToPureOperator(
simplified()->StringEqual());
1044 if (
r.BothInputsAre(Type::Signed32()) ||
1045 r.BothInputsAre(Type::Unsigned32())) {
1046 return r.ChangeToPureOperator(
simplified()->NumberEqual());
1047 }
else if (
r.GetCompareNumberOperationHint(&hint) &&
1055 return r.ChangeToSpeculativeOperator(
1056 simplified()->SpeculativeNumberEqual(hint), Type::Boolean());
1057 }
else if (
r.BothInputsAre(Type::Number())) {
1058 return r.ChangeToPureOperator(
simplified()->NumberEqual());
1059 }
else if (
r.GetCompareBigIntOperationHint(&hint_bigint)) {
1062 return r.ChangeToSpeculativeOperator(
1063 simplified()->SpeculativeBigIntEqual(hint_bigint), Type::Boolean());
1064 }
else if (
r.IsReceiverCompareOperation()) {
1068 r.CheckLeftInputToReceiver();
1069 return r.ChangeToPureOperator(
simplified()->ReferenceEqual());
1070 }
else if (
r.IsReceiverOrNullOrUndefinedCompareOperation()) {
1075 r.CheckLeftInputToReceiverOrNullOrUndefined();
1076 return r.ChangeToPureOperator(
simplified()->ReferenceEqual());
1077 }
else if (
r.IsStringCompareOperation()) {
1078 r.CheckInputsToString();
1079 return r.ChangeToPureOperator(
simplified()->StringEqual());
1080 }
else if (
r.IsSymbolCompareOperation()) {
1084 r.CheckLeftInputToSymbol();
1085 return r.ChangeToPureOperator(
simplified()->ReferenceEqual());
1093 if (input_type.
Is(Type::Name())) {
1095 ReplaceWithValue(node, input);
1096 return Replace(input);
1105 if (input_type.
IsNone() || input_type.
Max() <= 0.0) {
1106 input =
jsgraph()->ZeroConstant();
1110 if (input_type.
Min() <= 0.0) {
1112 jsgraph()->ZeroConstant(), input);
1120 ReplaceWithValue(node, input);
1121 return Replace(input);
1130 if (input_type.
Is(Type::String())) {
1132 if (
m.HasResolvedValue() &&
m.Ref(
broker()).IsString()) {
1135 if (!number.has_value())
return NoChange();
1136 return Replace(
jsgraph()->ConstantNoHole(number.value()));
1142 if (input_value.OddballToNumber(
broker()).To(&value)) {
1143 return Replace(
jsgraph()->ConstantNoHole(value));
1146 if (input_type.
Is(Type::Number())) {
1148 return Changed(input);
1150 if (input_type.
Is(Type::Undefined())) {
1152 return Replace(
jsgraph()->NaNConstant());
1154 if (input_type.
Is(Type::Null())) {
1156 return Replace(
jsgraph()->ZeroConstant());
1165 if (reduction.Changed()) {
1166 ReplaceWithValue(node, reduction.replacement());
1170 if (input_type.
Is(Type::PlainPrimitive())) {
1171 RelaxEffectsAndControls(node);
1172 node->TrimInputCount(1);
1178 return Changed(node);
1187 if (input_type.
Is(Type::BigInt())) {
1188 ReplaceWithValue(node, input);
1189 return Changed(input);
1198 if (input_type.
Is(Type::BigInt())) {
1199 ReplaceWithValue(node, input);
1200 return Changed(input);
1201 }
else if (input_type.
Is(Type::Signed32OrMinusZero()) ||
1202 input_type.
Is(Type::Unsigned32OrMinusZero())) {
1203 RelaxEffectsAndControls(node);
1204 node->TrimInputCount(1);
1210 simplified()->Integral32OrMinusZeroToBigInt());
1211 return Changed(node);
1219 if (input_type.
Is(Type::NonBigIntPrimitive())) {
1231 if (input->opcode() == IrOpcode::kJSToString) {
1235 return Changed(input);
1238 if (input_type.
Is(Type::String())) {
1239 return Changed(input);
1241 if (input_type.
Is(Type::Boolean())) {
1242 return Replace(
graph()->NewNode(
1247 if (input_type.
Is(Type::Undefined())) {
1251 if (input_type.
Is(Type::Null())) {
1254 if (input_type.
Is(Type::NaN())) {
1257 if (input_type.
Is(Type::Number())) {
1258 return Replace(
graph()->NewNode(
simplified()->NumberToString(), input));
1264 DCHECK_EQ(IrOpcode::kJSToString, node->opcode());
1268 if (reduction.Changed()) {
1269 ReplaceWithValue(node, reduction.replacement());
1276 DCHECK_EQ(IrOpcode::kJSToObject, node->opcode());
1283 if (receiver_type.
Is(Type::Receiver())) {
1284 ReplaceWithValue(node,
receiver, effect, control);
1294 Node* etrue = effect;
1298 Node* efalse = effect;
1307 Node* call = rfalse = efalse = if_false =
1310 receiver, context, frame_state, efalse, if_false);
1321 Node* on_exception =
nullptr;
1322 if (receiver_type.
Maybe(Type::NullOrUndefined()) &&
1327 Revisit(on_exception);
1334 ReplaceWithValue(node, node, effect, control);
1335 node->ReplaceInput(0, rtrue);
1336 node->ReplaceInput(1, rfalse);
1337 node->ReplaceInput(2, control);
1338 node->TrimInputCount(3);
1341 return Changed(node);
1351 if (name.equals(length_str) && receiver_type.
Is(Type::String())) {
1353 ReplaceWithValue(node, value);
1354 return Replace(value);
1360 DCHECK_EQ(IrOpcode::kJSHasInPrototypeChain, node->opcode());
1371 if (value_type.
Is(Type::Primitive())) {
1372 value =
jsgraph()->FalseConstant();
1373 ReplaceWithValue(node, value, effect, control);
1374 return Replace(value);
1382 Node* etrue0 = effect;
1389 Node* eloop = effect =
1408 simplified()->NumberLessThanOrEqual(), value_instance_type,
1416 Node* etrue1 = effect;
1422 jsgraph()->ConstantNoHole(FIRST_JS_RECEIVER_TYPE));
1428 vtrue1 =
jsgraph()->FalseConstant();
1431 Node* efalse1 = etrue1;
1437 prototype, context, frame_state, efalse1, if_false1);
1441 Node* on_exception =
nullptr;
1446 Revisit(on_exception);
1457 value_prototype,
jsgraph()->NullConstant());
1461 Node* etrue2 = effect;
1468 value_prototype, prototype);
1472 Node* etrue3 = effect;
1483 if_true3, if_false1);
1485 etrue3, efalse1, control);
1488 ReplaceWithValue(node, node, effect, control);
1489 node->ReplaceInput(0, vtrue0);
1490 node->ReplaceInput(1, vtrue1);
1491 node->ReplaceInput(2, vtrue2);
1492 node->ReplaceInput(3, vtrue3);
1493 node->ReplaceInput(4, vfalse1);
1494 node->ReplaceInput(5, control);
1495 node->TrimInputCount(6);
1498 return Changed(node);
1502 DCHECK_EQ(IrOpcode::kJSOrdinaryHasInstance, node->opcode());
1510 if (!constructor_type.
Maybe(Type::Callable())) {
1512 ReplaceWithValue(node, value);
1513 return Replace(value);
1519 if (!object_type.
Maybe(Type::Receiver()) &&
1520 !constructor_type.
Maybe(Type::BoundFunction())) {
1522 ReplaceWithValue(node, value);
1523 return Replace(value);
1530 DCHECK_EQ(IrOpcode::kJSHasContextExtension, node->opcode());
1541 for (
size_t i = 0;
i < depth; ++
i) {
1553 scope_info_flags, gasm.
Uint32Constant(ScopeInfo::ScopeTypeBits::kMask));
1558 gasm.
Assert(is_not_script_scope,
"we should no see a ScriptContext here",
1559 __FILE__, __LINE__);
1573 gasm.
Uint32Constant(ScopeInfo::HasContextExtensionSlotBit::kMask));
1581 ReplaceWithValue(node, has_extension_boolean, gasm.
effect(), gasm.
control());
1582 return Changed(node);
1586 DCHECK_EQ(IrOpcode::kJSLoadContext, node->opcode());
1591 for (
size_t i = 0;
i < access.depth(); ++
i) {
1595 context, effect, control);
1598 node->ReplaceInput(1, effect);
1599 node->AppendInput(
jsgraph()->zone(), control);
1603 return Changed(node);
1607 DCHECK_EQ(IrOpcode::kJSLoadScriptContext, node->opcode());
1617 for (
size_t i = 0;
i < access.depth(); ++
i) {
1627 .Then([&] {
return value; })
1633 size_t side_data_index =
1644 .Then([&] {
return data; })
1651 if (
v8_flags.script_context_mutable_heap_int32) {
1664 Type::OtherInternal());
1666 broker()->heap_number_map());
1668 Node* new_heap_number = a.Finish();
1678 kMutableHeapNumber))))
1687 Type::OtherInternal());
1689 broker()->heap_number_map());
1692 Node* new_heap_number = a.Finish();
1697 .Else([&] {
return value; })
1713 Type::OtherInternal());
1715 broker()->heap_number_map());
1717 Node* new_heap_number = a.Finish();
1721 .Else([&] {
return value; })
1725 .Else([&] {
return value; })
1732 return Changed(node);
1736 DCHECK_EQ(IrOpcode::kJSStoreContext, node->opcode());
1742 for (
size_t i = 0;
i < access.depth(); ++
i) {
1746 context, effect, control);
1748 node->ReplaceInput(0, context);
1749 node->ReplaceInput(1, value);
1750 node->ReplaceInput(2, effect);
1754 return Changed(node);
1758 DCHECK_EQ(IrOpcode::kJSStoreScriptContext, node->opcode());
1768 for (
size_t i = 0;
i < access.depth(); ++
i) {
1780 size_t side_data_index =
1795 context, new_value);
1799 DeoptimizeReason::kWrongValue);
1802 .Then([&] {
return data; })
1813 DeoptimizeReason::kWrongValue);
1814 if (
v8_flags.script_context_mutable_heap_number) {
1818 gasm.
If(is_smi_marker)
1826 if (
v8_flags.script_context_mutable_heap_int32) {
1830 gasm.
If(is_mutable_int32)
1833 Node* number_value =
1836 old_value, number_value);
1842 old_value, number_value);
1849 old_value, number_value);
1855 context, new_value);
1861 return Changed(node);
1865 DCHECK(node->opcode() == IrOpcode::kJSLoadModule ||
1866 node->opcode() == IrOpcode::kJSStoreModule);
1877 OptionalCellRef cell_constant =
1879 if (cell_constant.has_value())
1888 index = cell_index - 1;
1893 index = -cell_index - 1;
1896 module, effect, control);
1903 DCHECK_EQ(IrOpcode::kJSLoadModule, node->opcode());
1908 if (cell->op()->EffectOutputCount() > 0) effect = cell;
1909 Node* value = effect =
1911 cell, effect, control);
1913 ReplaceWithValue(node, value, effect, control);
1914 return Changed(value);
1918 DCHECK_EQ(IrOpcode::kJSStoreModule, node->opcode());
1927 if (cell->op()->EffectOutputCount() > 0) effect = cell;
1930 cell, value, effect, control);
1932 ReplaceWithValue(node, effect, effect, control);
1933 return Changed(value);
1964 Node* target = node->
InputAt(JSCallOrConstructNode::TargetIndex());
1971 if (node->opcode() == IrOpcode::kJSConstruct) {
1972 static_assert(JSCallNode::ReceiverIndex() ==
1973 JSConstructNode::NewTargetIndex());
1975 node->ReplaceInput(JSConstructNode::NewTargetIndex(),
1976 jsgraph->UndefinedConstant());
1980 node->RemoveInput(
JSCallNode{node}.FeedbackVectorIndex());
1985 const bool has_builtin_exit_frame =
true;
1994 static const int kStub = 1;
2000 node->InsertInput(zone, 2, target);
2001 node->InsertInput(zone, 3, argc_node);
2010 node->InsertInput(zone, cursor++, argc_node);
2012 static const int kReturnCount = 1;
2016 zone, kReturnCount, argc, debug_name, properties, flags,
2024 DCHECK_EQ(IrOpcode::kJSConstructForwardVarargs, node->opcode());
2028 int const arity =
static_cast<int>(p.
arity() - 2);
2029 int const start_index =
static_cast<int>(p.
start_index());
2041 node->InsertInput(
graph()->zone(), 0,
2043 node->InsertInput(
graph()->zone(), 3,
2045 node->InsertInput(
graph()->zone(), 4,
2046 jsgraph()->ConstantNoHole(start_index));
2047 node->InsertInput(
graph()->zone(), 5,
jsgraph()->UndefinedConstant());
2052 return Changed(node);
2062 Node* target = n.target();
2076 ? Builtin::kJSBuiltinsConstructStub
2077 : Builtin::kJSConstructStubGeneric);
2078 static_assert(JSConstructNode::TargetIndex() == 0);
2079 static_assert(JSConstructNode::NewTargetIndex() == 1);
2080 node->RemoveInput(n.FeedbackVectorIndex());
2081 node->InsertInput(
graph()->zone(), 0,
2083 node->InsertInput(
graph()->zone(), 3,
2085 node->InsertInput(
graph()->zone(), 4,
jsgraph()->UndefinedConstant());
2090 return Changed(node);
2097 DCHECK_EQ(IrOpcode::kJSCallForwardVarargs, node->opcode());
2100 int const arity =
static_cast<int>(p.
arity() - 2);
2101 int const start_index =
static_cast<int>(p.
start_index());
2106 if (target_type.
Is(Type::CallableFunction())) {
2111 node->InsertInput(
graph()->zone(), 0,
2113 node->InsertInput(
graph()->zone(), 2,
2115 node->InsertInput(
graph()->zone(), 3,
2116 jsgraph()->ConstantNoHole(start_index));
2120 return Changed(node);
2131 Node* target = n.target();
2135 Effect effect = n.effect();
2136 Control control = n.control();
2139 if (receiver_type.
Is(Type::NullOrUndefined())) {
2141 }
else if (!receiver_type.
Maybe(Type::NullOrUndefined())) {
2146 OptionalJSFunctionRef function;
2147 OptionalSharedFunctionInfoRef
shared;
2152 shared = function->shared(
broker());
2153 }
else if (target->opcode() == IrOpcode::kJSCreateClosure) {
2157 }
else if (target->opcode() == IrOpcode::kCheckClosure) {
2159 shared = cell.shared_function_info(
broker());
2162 if (shared.has_value()) {
2167 if (shared->HasBreakInfo(
broker()))
return NoChange();
2177 if (
is_sloppy(shared->language_mode()) && !shared->native() &&
2178 !receiver_type.
Is(Type::Receiver())) {
2179 if (!function.has_value() || !function->native_context(
broker()).
equals(
2180 broker()->target_native_context())) {
2207 shared->internal_formal_parameter_count_without_receiver();
2208 if (formal_count > arity) {
2209 node->RemoveInput(n.FeedbackVectorIndex());
2212 for (
int i = arity;
i < formal_count;
i++) {
2213 node->InsertInput(
graph()->zone(), arity + 2,
2214 jsgraph()->UndefinedConstant());
2219 node->InsertInput(
graph()->zone(), formal_count + 3,
2221#ifdef V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE
2223 graph()->zone(), formal_count + 4,
2228 graph()->zone(),
false, 1 + formal_count,
2230 }
else if (shared->HasBuiltinId() &&
2233 ReduceBuiltin(
jsgraph(), node, shared->builtin_id(), arity, flags);
2234 }
else if (shared->HasBuiltinId()) {
2235 Builtin builtin = shared->builtin_id();
2248 graph()->zone(), descriptor, 1 + arity, flags);
2253 node->InsertInput(
graph()->zone(), 3,
2255#ifdef V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE
2263 node->RemoveInput(n.FeedbackVectorIndex());
2265 node->InsertInput(
graph()->zone(), arity + 3,
2267#ifdef V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE
2269 graph()->zone(), arity + 4,
2274 graph()->zone(),
false, 1 + arity,
2277 return Changed(node);
2281 if (target_type.
Is(Type::CallableFunction())) {
2283 node->RemoveInput(n.FeedbackVectorIndex());
2288 node->InsertInput(
graph()->zone(), 0,
2290 node->InsertInput(
graph()->zone(), 2,
2295 return Changed(node);
2304 return Changed(node);
2313 Node* cache_array = n.cache_array();
2314 Node* cache_type = n.cache_type();
2315 Node* index = n.index();
2316 Node* context = n.context();
2318 Effect effect = n.effect();
2319 Control control = n.control();
2322 Node* receiver_map = effect =
2326 switch (n.Parameters().mode()) {
2331 receiver_map, cache_type);
2334 check, effect, control);
2338 ReplaceWithValue(node, node, node, control);
2341 node->ReplaceInput(0, cache_array);
2342 node->ReplaceInput(1, index);
2343 node->ReplaceInput(2, effect);
2344 node->ReplaceInput(3, control);
2345 node->TrimInputCount(4);
2356 n.Parameters().mode())),
2357 cache_array, index, effect, control);
2361 receiver_map, cache_type);
2390 context, frame_state, effect, if_false);
2397 Node* if_exception =
nullptr;
2402 Revisit(if_exception);
2408 ReplaceWithValue(node, node, effect, control);
2411 node->ReplaceInput(0, vtrue);
2412 node->ReplaceInput(1, vfalse);
2413 node->ReplaceInput(2, control);
2414 node->TrimInputCount(3);
2420 return Changed(node);
2425 Node* enumerator = n.enumerator();
2426 Effect effect = n.effect();
2427 Control control = n.control();
2428 Node* cache_type = enumerator;
2429 Node* cache_array =
nullptr;
2430 Node* cache_length =
nullptr;
2432 switch (n.Parameters().mode()) {
2439 Node* check_for_fixed_array = effect =
2442 enumerator, effect, control);
2443 Node* check_for_not_fixed_array =
2447 check_for_not_fixed_array, effect, control);
2452 enumerator, effect, control);
2455 descriptor_array, effect, control);
2458 enum_cache, effect, control);
2464 static_assert(Map::Bits3::EnumLengthBits::kShift == 0);
2467 jsgraph()->ConstantNoHole(Map::Bits3::EnumLengthBits::kMask));
2475 Node* check = effect =
2478 enumerator, effect, control);
2483 Node* etrue = effect;
2484 Node* cache_array_true;
2485 Node* cache_length_true;
2490 enumerator, etrue, if_map);
2491 Node* enum_cache = etrue =
2494 descriptor_array, etrue, if_map);
2497 enum_cache, etrue, if_map);
2502 enumerator, etrue, if_map);
2503 static_assert(Map::Bits3::EnumLengthBits::kShift == 0);
2506 jsgraph()->ConstantNoHole(Map::Bits3::EnumLengthBits::kMask));
2510 Node* efalse = effect;
2511 Node* cache_array_false;
2512 Node* cache_length_false;
2515 cache_array_false = enumerator;
2518 cache_array_false, efalse, if_fixed_array);
2526 cache_array_true, cache_array_false, control);
2529 cache_length_true, cache_length_false, control);
2535 for (
Edge edge : node->use_edges()) {
2536 Node*
const user = edge.from();
2538 edge.UpdateTo(effect);
2541 edge.UpdateTo(control);
2547 Replace(user, cache_type);
2550 Replace(user, cache_array);
2553 Replace(user, cache_length);
2561 return Replace(effect);
2565 DCHECK_EQ(IrOpcode::kJSLoadMessage, node->opcode());
2568 node->ReplaceInput(0,
jsgraph()->ExternalConstant(ref));
2570 return Changed(node);
2574 DCHECK_EQ(IrOpcode::kJSStoreMessage, node->opcode());
2578 node->ReplaceInput(0,
jsgraph()->ExternalConstant(ref));
2579 node->ReplaceInput(1, value);
2581 return Changed(node);
2585 DCHECK_EQ(IrOpcode::kJSGeneratorStore, node->opcode());
2603 generator, effect, control);
2605 for (
int i = 0;
i < value_count; ++
i) {
2607 if (value !=
jsgraph()->OptimizedOutConstant()) {
2610 value, effect, control);
2615 context, effect, control);
2619 generator,
offset, effect, control);
2621 ReplaceWithValue(node, effect, effect, control);
2622 return Changed(effect);
2626 DCHECK_EQ(IrOpcode::kJSGeneratorRestoreContinuation, node->opcode());
2635 simplified()->LoadField(continuation_field), generator, effect, control);
2639 generator, executing, effect, control);
2646 DCHECK_EQ(IrOpcode::kJSGeneratorRestoreContext, node->opcode());
2657 return Changed(node);
2661 DCHECK_EQ(IrOpcode::kJSGeneratorRestoreRegister, node->opcode());
2672 generator, effect, control);
2674 simplified()->LoadField(element_field), array, effect, control);
2677 stale, effect, control);
2679 ReplaceWithValue(node, element, effect, control);
2680 return Changed(element);
2684 DCHECK_EQ(IrOpcode::kJSGeneratorRestoreInputOrDebugPos, node->opcode());
2696 return Changed(node);
2708 if (value_type.
Is(Type::Array())) {
2709 value =
jsgraph()->TrueConstant();
2710 ReplaceWithValue(node, value);
2711 return Replace(value);
2712 }
else if (!value_type.
Maybe(Type::ArrayOrProxy())) {
2713 value =
jsgraph()->FalseConstant();
2714 ReplaceWithValue(node, value);
2715 return Replace(value);
2730 effects[
count] = effect;
2745 jsgraph()->ConstantNoHole(JS_ARRAY_TYPE));
2750 effects[
count] = effect;
2758 jsgraph()->ConstantNoHole(JS_PROXY_TYPE));
2764 effects[
count] = effect;
2771 value = effect = control =
2773 context, frame_state, effect, control);
2778 Node* on_exception =
nullptr;
2783 Revisit(on_exception);
2787 controls[
count] = control;
2788 effects[
count] = effect;
2793 effects[
count] = control;
2794 values[
count] = control;
2798 ReplaceWithValue(node, value, effect, control);
2799 return Replace(value);
2815 ReplaceWithValue(node, value);
2816 return Replace(value);
2822 DCHECK_EQ(IrOpcode::kJSResolvePromise, node->opcode());
2828 if (resolution_type.
Is(Type::Primitive())) {
2830 node->RemoveInput(3);
2832 return Changed(node);
2838 switch (node->opcode()) {
2839 case IrOpcode::kJSEqual:
2841 case IrOpcode::kJSStrictEqual:
2843 case IrOpcode::kJSLessThan:
2844 case IrOpcode::kJSGreaterThan:
2845 case IrOpcode::kJSLessThanOrEqual:
2846 case IrOpcode::kJSGreaterThanOrEqual:
2848 case IrOpcode::kJSBitwiseOr:
2849 case IrOpcode::kJSBitwiseXor:
2850 case IrOpcode::kJSBitwiseAnd:
2852 case IrOpcode::kJSShiftLeft:
2853 case IrOpcode::kJSShiftRight:
2855 case IrOpcode::kJSShiftRightLogical:
2857 case IrOpcode::kJSAdd:
2859 case IrOpcode::kJSSubtract:
2860 case IrOpcode::kJSMultiply:
2861 case IrOpcode::kJSDivide:
2862 case IrOpcode::kJSModulus:
2863 case IrOpcode::kJSExponentiate:
2865 case IrOpcode::kJSBitwiseNot:
2867 case IrOpcode::kJSDecrement:
2869 case IrOpcode::kJSIncrement:
2871 case IrOpcode::kJSNegate:
2873 case IrOpcode::kJSHasInPrototypeChain:
2875 case IrOpcode::kJSOrdinaryHasInstance:
2877 case IrOpcode::kJSToLength:
2879 case IrOpcode::kJSToName:
2881 case IrOpcode::kJSToNumber:
2882 case IrOpcode::kJSToNumberConvertBigInt:
2884 case IrOpcode::kJSToBigInt:
2886 case IrOpcode::kJSToBigIntConvertNumber:
2888 case IrOpcode::kJSToNumeric:
2890 case IrOpcode::kJSToString:
2892 case IrOpcode::kJSToObject:
2894 case IrOpcode::kJSLoadNamed:
2896 case IrOpcode::kJSLoadContext:
2898 case IrOpcode::kJSLoadScriptContext:
2900 case IrOpcode::kJSStoreContext:
2902 case IrOpcode::kJSStoreScriptContext:
2904 case IrOpcode::kJSLoadModule:
2906 case IrOpcode::kJSStoreModule:
2908 case IrOpcode::kJSConstructForwardVarargs:
2910 case IrOpcode::kJSConstruct:
2912 case IrOpcode::kJSCallForwardVarargs:
2914 case IrOpcode::kJSCall:
2916 case IrOpcode::kJSForInPrepare:
2918 case IrOpcode::kJSForInNext:
2920 case IrOpcode::kJSHasContextExtension:
2922 case IrOpcode::kJSLoadMessage:
2924 case IrOpcode::kJSStoreMessage:
2926 case IrOpcode::kJSGeneratorStore:
2928 case IrOpcode::kJSGeneratorRestoreContinuation:
2930 case IrOpcode::kJSGeneratorRestoreContext:
2932 case IrOpcode::kJSGeneratorRestoreRegister:
2934 case IrOpcode::kJSGeneratorRestoreInputOrDebugPos:
2936 case IrOpcode::kJSObjectIsArray:
2938 case IrOpcode::kJSParseInt:
2940 case IrOpcode::kJSResolvePromise:
union v8::internal::@341::BuiltinMetadata::KindSpecificData data
#define SBXCHECK_GE(lhs, rhs)
#define SBXCHECK(condition)
constexpr UnderlyingType & value() &
static constexpr int kNumExtraArgsWithReceiver
static constexpr int kNewTargetIndex
static constexpr int kPaddingIndex
static constexpr int kArgcIndex
static constexpr int kTargetIndex
static V8_EXPORT_PRIVATE bool IsCpp(Builtin builtin)
static Address CppEntryOf(Builtin builtin)
static int GetFormalParameterCount(Builtin builtin)
static V8_EXPORT_PRIVATE bool HasJSLinkage(Builtin builtin)
static V8_EXPORT_PRIVATE const char * name(Builtin builtin)
static V8_EXPORT_PRIVATE Callable CallableFor(Isolate *isolate, Builtin builtin)
int GetStackParameterCount() const
Handle< Code > code() const
CallInterfaceDescriptor descriptor() const
static Callable ConstructFunctionForwardVarargs(Isolate *isolate)
static Callable StringAdd(Isolate *isolate, StringAddFlags flags=STRING_ADD_CHECK_NONE)
static Callable CallFunctionForwardVarargs(Isolate *isolate)
static Callable CallFunction(Isolate *isolate, ConvertReceiverMode mode=ConvertReceiverMode::kAny)
static const uint32_t kMinLength
@ MIN_CONTEXT_EXTENDED_SLOTS
@ CONTEXT_SIDE_TABLE_PROPERTY_INDEX
static V8_EXPORT_PRIVATE ExternalReference address_of_pending_message(LocalIsolate *local_isolate)
static ExternalReference Create(const SCTableReference &table_ref)
static const int kGeneratorExecuting
static const int kProtectorValid
static CellIndexKind GetCellIndexKind(int cell_index)
static const uint32_t kMaxLength
static TNode UncheckedCast(compiler::Node *node)
static FieldAccess ForMap(WriteBarrierKind write_barrier=kMapWriteBarrier)
static FieldAccess ForCellValue()
static FieldAccess ForContextSlotSmi(size_t index)
static FieldAccess ForHeapNumberValue()
static FieldAccess ForScopeInfoFlags()
static FieldAccess ForFixedArraySlot(size_t index, WriteBarrierKind write_barrier_kind=kFullWriteBarrier)
static FieldAccess ForModuleRegularExports()
static FieldAccess ForEnumCacheKeys()
static FieldAccess ForHeapInt32Value()
static FieldAccess ForModuleRegularImports()
static FieldAccess ForContextSlotKnownPointer(size_t index)
static FieldAccess ForJSGeneratorObjectContext()
static FieldAccess ForFixedArrayLength()
static FieldAccess ForJSGeneratorObjectInputOrDebugPos()
static ElementAccess ForJSForInCacheArrayElement(ForInMode mode)
static FieldAccess ForJSPrimitiveWrapperValue()
static FieldAccess ForContextSlot(size_t index)
static FieldAccess ForJSFunctionContext()
static FieldAccess ForMapPrototype()
static FieldAccess ForMapInstanceType()
static FieldAccess ForMapDescriptors()
static FieldAccess ForContextSideProperty()
static FieldAccess ForMapBitField3()
static FieldAccess ForJSGeneratorObjectContinuation()
static FieldAccess ForDescriptorArrayEnumCache()
static FieldAccess ForJSGeneratorObjectParametersAndRegisters()
uint32_t start_index() const
ConvertReceiverMode convert_mode() const
CallFeedbackRelation feedback_relation() const
CallFrequency const & frequency() const
int arity_without_implicit_args() const
FeedbackSource const & feedback() const
SpeculationMode speculation_mode() const
const Operator * Call(const CallDescriptor *call_descriptor)
bool DependOnProtector(PropertyCellRef cell)
uint32_t start_index() const
int arity_without_implicit_args() const
SharedFunctionInfoRef shared_info() const
FeedbackSource const & feedback() const
V8_INLINE void UpdateEffectControlWith(Node *node)
TNode< Uint32T > Uint32Constant(uint32_t value)
Node * LoadHeapNumberValue(Node *heap_number)
void InitializeEffectControl(Node *effect, Node *control)
BinaryOperationHint GetBinaryOperationHint(Node *node) const
bool NeitherInputCanBe(Type t)
void ConvertInputsToNumber()
Node * ConvertToUI32(Node *node, Signedness signedness)
bool BothInputsMaybe(Type t)
JSTypedLowering * lowering_
void ConvertInputsToUI32(Signedness left_signedness, Signedness right_signedness)
bool IsReceiverOrNullOrUndefinedCompareOperation()
bool GetCompareNumberOperationHint(NumberOperationHint *hint)
void update_effect(Node *effect)
bool BothInputsAre(Type t)
void CheckInputsToStringOrStringWrapper()
SimplifiedOperatorBuilder * simplified()
JSOperatorBuilder * javascript()
bool OneInputCannotBe(Type t)
Node * ConvertPlainPrimitiveToNumber(Node *node)
void CheckLeftInputToSymbol()
Reduction ChangeToPureOperator(const Operator *op, Type type=Type::Any())
bool IsInternalizedStringCompareOperation()
void CheckInputsToInternalizedString()
Reduction ChangeToSpeculativeOperator(const Operator *op, Type upper_bound)
void CheckInputsToSymbol()
void CheckInputsToReceiver()
void CheckLeftInputToReceiver()
void CheckInputsToReceiverOrNullOrUndefined()
bool IsStringCompareOperation()
CommonOperatorBuilder * common()
bool GetCompareBigIntOperationHint(BigIntOperationHint *hint)
JSBinopReduction(JSTypedLowering *lowering, Node *node)
const Operator * NumberOp()
bool IsReceiverCompareOperation()
void CheckInputsToString()
void CheckLeftInputToReceiverOrNullOrUndefined()
bool RightInputIs(Type t)
bool IsSymbolCompareOperation()
CompareOperationHint GetCompareOperationHint(Node *node) const
bool ShouldCreateConsString()
const CreateClosureParameters & Parameters() const
IfBuilder0 & Then(const VoidGenerator0 &body)
TNode< Map > LoadMap(TNode< HeapObject > object)
Node * StoreField(FieldAccess const &, Node *object, Node *value)
Node * CheckSmi(Node *value, const FeedbackSource &feedback={})
TNode< T > ExitMachineGraph(TNode< U > input, MachineRepresentation output_representation, Type output_type)
Node * CheckNumberFitsInt32(Node *value, const FeedbackSource &feedback={})
IfBuilder1< T, Boolean > SelectIf(TNode< Boolean > cond)
Node * CheckIf(Node *cond, DeoptimizeReason reason, const FeedbackSource &feedback={})
Node * CheckNumber(Node *value, const FeedbackSource &feedback={})
Node * Assert(Node *cond, const char *condition_string="", const char *file="", int line=-1)
TNode< Boolean > ReferenceEqual(TNode< Object > lhs, TNode< Object > rhs)
TNode< T > EnterMachineGraph(TNode< U > input, UseInfo use_info)
IfBuilder0 IfNot(TNode< Boolean > cond)
TNode< Boolean > ObjectIsSmi(TNode< Object > value)
IfBuilder0 If(TNode< Boolean > cond)
Node * LoadField(FieldAccess const &, Node *object)
Node * BooleanNot(Node *cond)
TNode< Smi > SmiConstant(int32_t value)
JSOperatorBuilder * javascript() const
SimplifiedOperatorBuilder * simplified() const
Node * HeapConstantNoHole(Handle< HeapObject > value)
Node * CEntryStubConstant(int result_size, ArgvMode argv_mode=ArgvMode::kStack, bool builtin_exit_frame=false)
Isolate * isolate() const
Factory * factory() const
Node * ConstantNoHole(ObjectRef ref, JSHeapBroker *broker)
TNode< Hole > PaddingConstant()
BinaryOperationHint GetFeedbackForBinaryOperation(FeedbackSource const &source)
CompilationDependencies * dependencies() const
CompareOperationHint GetFeedbackForCompareOperation(FeedbackSource const &source)
static constexpr bool IsBinaryWithFeedback(Operator::Opcode opcode)
Reduction ReduceJSGeneratorStore(Node *node)
Reduction ReduceJSToLength(Node *node)
Reduction ReduceJSLoadModule(Node *node)
JSGraph * jsgraph() const
Reduction ReduceJSToBigInt(Node *node)
JSHeapBroker * broker() const
SimplifiedOperatorBuilder * simplified() const
Reduction ReduceJSGeneratorRestoreContinuation(Node *node)
Reduction ReduceJSAdd(Node *node)
Reduction ReduceJSParseInt(Node *node)
Reduction ReduceJSLoadContext(Node *node)
JSOperatorBuilder * javascript() const
Reduction ReduceJSCallForwardVarargs(Node *node)
Reduction ReduceJSLoadNamed(Node *node)
Reduction ReduceNumberBinop(Node *node)
Reduction ReduceJSStoreContext(Node *node)
JSTypedLowering(Editor *editor, JSGraph *jsgraph, JSHeapBroker *broker, Zone *zone)
Reduction ReduceJSGeneratorRestoreInputOrDebugPos(Node *node)
Reduction ReduceInt32Binop(Node *node)
Reduction ReduceJSNegate(Node *node)
Reduction ReduceJSBitwiseNot(Node *node)
Reduction ReduceJSCall(Node *node)
Type pointer_comparable_type_
Reduction ReduceJSEqual(Node *node)
Factory * factory() const
Reduction ReduceJSToString(Node *node)
Reduction ReduceJSLoadScriptContext(Node *node)
Reduction ReduceObjectIsArray(Node *node)
Reduction ReduceJSToStringInput(Node *input)
Isolate * isolate() const
Reduction ReduceJSIncrement(Node *node)
Reduction ReduceJSConstructForwardVarargs(Node *node)
CompilationDependencies * dependencies() const
Reduction ReduceUI32Shift(Node *node, Signedness signedness)
Reduction ReduceJSConstruct(Node *node)
Reduction ReduceJSToNumberInput(Node *input)
Reduction ReduceJSToNumeric(Node *node)
Reduction ReduceJSToBigIntConvertNumber(Node *node)
Reduction ReduceJSStoreMessage(Node *node)
Reduction ReduceJSComparison(Node *node)
CommonOperatorBuilder * common() const
Reduction ReduceJSStrictEqual(Node *node)
Node * BuildGetModuleCell(Node *node)
TypeCache const * type_cache_
Reduction ReduceJSStoreScriptContext(Node *node)
Reduction ReduceJSToObject(Node *node)
Reduction ReduceJSDecrement(Node *node)
Node * UnwrapStringWrapper(Node *string_or_wrapper, Node **effect, Node **control)
Reduction ReduceJSHasInPrototypeChain(Node *node)
Reduction ReduceJSForInNext(Node *node)
Reduction ReduceJSResolvePromise(Node *node)
Reduction ReduceJSStoreModule(Node *node)
Reduction ReduceJSToName(Node *node)
Reduction ReduceJSLoadMessage(Node *node)
Reduction ReduceJSForInPrepare(Node *node)
Reduction ReduceJSGeneratorRestoreRegister(Node *node)
Reduction ReduceJSGeneratorRestoreContext(Node *node)
Reduction GenerateStringAddition(Node *node, Node *left, Node *right, Node *context, Node *frame_state, Node **effect, Node **control, bool should_create_cons_string)
Reduction ReduceJSHasContextExtension(Node *node)
Reduction ReduceJSOrdinaryHasInstance(Node *node)
Reduction Reduce(Node *node) final
Reduction ReduceJSToNumber(Node *node)
static CallDescriptor * GetStubCallDescriptor(Zone *zone, const CallInterfaceDescriptor &descriptor, int stack_parameter_count, CallDescriptor::Flags flags, Operator::Properties properties=Operator::kNoProperties, StubCallMode stub_mode=StubCallMode::kCallCodeObject)
static CallDescriptor * GetJSCallDescriptor(Zone *zone, bool is_osr, int parameter_count, CallDescriptor::Flags flags, Operator::Properties properties=Operator::kNoProperties)
static CallDescriptor * GetCEntryStubCallDescriptor(Zone *zone, int return_count, int js_parameter_count, const char *debug_name, Operator::Properties properties, CallDescriptor::Flags flags, StackArgumentOrder stack_order=StackArgumentOrder::kDefault)
Node * ExternalConstant(ExternalReference ref)
CommonOperatorBuilder * common() const
static void ChangeOp(Node *node, const Operator *new_op)
static void ReplaceEffectInput(Node *node, Node *effect, int index=0)
static Type GetType(const Node *node)
static void RemoveNonValueInputs(Node *node)
static bool IsControlEdge(Edge edge)
static void ReplaceControlInput(Node *node, Node *control, int index=0)
static Node * GetEffectInput(Node *node, int index=0)
static int FirstFrameStateIndex(Node *node)
static int FirstContextIndex(Node *node)
static Node * GetContextInput(Node *node)
static bool IsValueEdge(Edge edge)
static void ReplaceContextInput(Node *node, Node *context)
static Node * GetFrameStateInput(Node *node)
static Node * GetValueInput(Node *node, int index)
static bool IsEffectEdge(Edge edge)
static void SetType(Node *node, Type type)
static void ReplaceValueInput(Node *node, Node *value, int index)
static void ReplaceValueInputs(Node *node, Node *value)
static bool IsExceptionalCall(Node *node, Node **out_exception=nullptr)
static Node * GetControlInput(Node *node, int index=0)
constexpr IrOpcode::Value opcode() const
const Operator * op() const
void ReplaceInput(int index, Node *new_to)
Node * InputAt(int index) const
Node * RemoveInput(int index)
void InsertInput(Zone *zone, int index, Node *new_to)
static bool HasContextInput(const Operator *op)
static bool HasFrameStateInput(const Operator *op)
static int GetFrameStateInputCount(const Operator *op)
int ControlInputCount() const
int ValueInputCount() const
int EffectOutputCount() const
base::Flags< Property, uint8_t > Properties
int ControlOutputCount() const
int EffectInputCount() const
void CacheAsProtector(JSHeapBroker *broker) const
ObjectRef value(JSHeapBroker *broker) const
Node * replacement() const
const Operator * StringLessThan()
const Operator * StringLessThanOrEqual()
const Operator * NumberLessThan()
const Operator * NumberShiftLeft()
const Operator * NumberMultiply()
const Operator * NumberDivide()
const Operator * NumberBitwiseOr()
const Operator * NumberSubtract()
const Operator * NumberPow()
const Operator * NumberModulus()
const Operator * NumberBitwiseAnd()
const Operator * StringConcat()
const Operator * NewConsString()
const Operator * NumberShiftRightLogical()
const Operator * NumberShiftRight()
const Operator * NumberLessThanOrEqual()
const Operator * LoadField(FieldAccess const &)
const Operator * NumberAdd()
const Operator * NumberBitwiseXor()
OptionalCellRef GetCell(JSHeapBroker *broker, int cell_index) const
bool IsExternalString() const
std::optional< double > ToNumber(JSHeapBroker *broker)
Node * NewNode(const Operator *op, int input_count, Node *const *inputs, bool incomplete=false)
Type const kTenOrUndefined
Type const kIntegerOrMinusZero
Type const kStringLengthType
Type const kZeroOrUndefined
static Type Union(Type type1, Type type2, Zone *zone)
bool Maybe(Type that) const
bool IsHeapConstant() const
const HeapConstantType * AsHeapConstant() const
static Type Intersect(Type type1, Type type2, Zone *zone)
static UseInfo TruncatingWord32()
JSHeapBroker *const broker_
DirectHandle< Object > new_target
std::optional< TNode< JSArray > > a
SharedFunctionInfoRef shared
ZoneVector< RpoNumber > & result
MovableLabel continuation
UnionOf< Boolean, Null, Undefined > BooleanOrNullOrUndefined
V8_INLINE const Operation & Get(const Graph &graph, OpIndex index)
size_t ProjectionIndexOf(const Operator *const op)
JSCallNodeBase< IrOpcode::kJSCall > JSCallNode
@ kUseEnumCacheKeysAndIndices
NamedAccess const & NamedAccessOf(const Operator *op)
CallForwardVarargsParameters const & CallForwardVarargsParametersOf(Operator const *op)
int RestoreRegisterIndexOf(const Operator *op)
Handle< FeedbackCell > FeedbackCellOf(const Operator *op)
ConstructForwardVarargsParameters const & ConstructForwardVarargsParametersOf(Operator const *op)
HeapConstantNoHole(BUILTIN_CODE(isolate(), AllocateInOldGeneration))) DEFINE_GETTER(ArrayConstructorStubConstant
T const & OpParameter(const Operator *op)
JSConstructNodeBase< IrOpcode::kJSConstruct > JSConstructNode
FeedbackParameter const & FeedbackParameterOf(const Operator *op)
std::string ToString(const BytecodeLivenessState &liveness)
ContextAccess const & ContextAccessOf(Operator const *op)
int GeneratorStoreValueCountOf(const Operator *op)
ref_traits< T >::ref_type MakeRef(JSHeapBroker *broker, Tagged< T > object)
@ kReceiverOrNullOrUndefined
constexpr double kMaxSafeInteger
@ STRING_ADD_CONVERT_RIGHT
@ STRING_ADD_CONVERT_LEFT
bool is_sloppy(LanguageMode language_mode)
bool IsClassConstructor(FunctionKind kind)
bool Is(IndirectHandle< U > value)
int ToNumber(Register reg)
constexpr int kJSArgcReceiverSlots
void Terminate(Isolate *isolate)
uint32_t NumberToUint32(Tagged< Object > number)
constexpr JSDispatchHandle kPlaceholderDispatchHandle(0x0)
int32_t NumberToInt32(Tagged< Object > number)
@ LAST_SPECIAL_RECEIVER_TYPE
V8_EXPORT_PRIVATE FlagValues v8_flags
constexpr int JSParameterCount(int param_count_without_receiver)
!IsContextMap !IsContextMap native_context
#define DCHECK_LE(v1, v2)
#define DCHECK_NE(v1, v2)
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)