Lines Matching refs:Node
13 #include "src/compiler/node-matchers.h"
14 #include "src/compiler/node-properties.h"
28 explicit JSCallReduction(Node* node) : node_(node) {}
30 // Determines whether the node is a JSCall operation that targets a
78 Node* receiver() { return NodeProperties::GetValueInput(node_, 1); }
79 Node* left() { return GetJSCallInput(0); }
80 Node* right() { return GetJSCallInput(1); }
88 Node* GetJSCallInput(int index) {
96 Node* node_;
112 MaybeHandle<Map> GetMapWitness(Node* node) {
114 Node* receiver = NodeProperties::GetValueInput(node, 1);
115 Node* effect = NodeProperties::GetEffectInput(node);
186 Reduction JSBuiltinReducer::ReduceArrayIterator(Node* node,
189 if (GetMapWitness(node).ToHandle(&receiver_map)) {
190 return ReduceArrayIterator(receiver_map, node, kind,
196 Reduction JSBuiltinReducer::ReduceTypedArrayIterator(Node* node,
199 if (GetMapWitness(node).ToHandle(&receiver_map) &&
201 return ReduceArrayIterator(receiver_map, node, kind,
208 Node* node, IterationKind kind,
210 Node* receiver = NodeProperties::GetValueInput(node, 1);
211 Node* effect = NodeProperties::GetEffectInput(node);
212 Node* control = NodeProperties::GetControlInput(node);
225 Node* buffer = effect = graph()->NewNode(
230 Node* check = effect = graph()->NewNode(
239 Node* object_map = jsgraph()->UndefinedConstant();
297 Node* value = effect = graph()->NewNode(
324 ReplaceWithValue(node, value, effect, control);
329 Handle<Map> iterator_map, Node* node, IterationKind kind) {
330 Node* iterator = NodeProperties::GetValueInput(node, 1);
331 Node* effect = NodeProperties::GetEffectInput(node);
332 Node* control = NodeProperties::GetControlInput(node);
333 Node* context = NodeProperties::GetContextInput(node);
355 Node* array = effect = graph()->NewNode(
358 Node* check0 = graph()->NewNode(simplified()->ReferenceEqual(), array,
360 Node* branch0 =
363 Node* vdone_false0;
364 Node* vfalse0;
365 Node* efalse0 = effect;
366 Node* if_false0 = graph()->NewNode(common()->IfFalse(), branch0);
369 Node* index = efalse0 = graph()->NewNode(
374 Node* length = efalse0 = graph()->NewNode(
377 Node* check1 =
379 Node* branch1 = graph()->NewNode(common()->Branch(BranchHint::kTrue),
382 Node* vdone_true1;
383 Node* vtrue1;
384 Node* etrue1 = efalse0;
385 Node* if_true1 = graph()->NewNode(common()->IfTrue(), branch1);
394 Node* array_map = etrue1 =
397 Node* orig_map = etrue1 =
401 Node* check_map = graph()->NewNode(simplified()->ReferenceEqual(),
408 Node* elements = etrue1 = graph()->NewNode(
411 Node* value = etrue1 = graph()->NewNode(
439 Node* next_index = graph()->NewNode(simplified()->NumberAdd(), index,
449 Node* vdone_false1;
450 Node* vfalse1;
451 Node* efalse1 = efalse0;
452 Node* if_false1 = graph()->NewNode(common()->IfFalse(), branch1);
472 Node* vdone_true0;
473 Node* vtrue0;
474 Node* etrue0 = effect;
475 Node* if_true0 = graph()->NewNode(common()->IfTrue(), branch0);
484 Node* value =
487 Node* done =
494 ReplaceWithValue(node, value, effect, control);
499 Handle<Map> iterator_map, Node* node, IterationKind kind) {
500 Node* iterator = NodeProperties::GetValueInput(node, 1);
501 Node* effect = NodeProperties::GetEffectInput(node);
502 Node* control = NodeProperties::GetControlInput(node);
503 Node* context = NodeProperties::GetContextInput(node);
508 Node* array = effect = graph()->NewNode(
511 Node* check0 = graph()->NewNode(simplified()->ReferenceEqual(), array,
513 Node* branch0 =
516 Node* vdone_false0;
517 Node* vfalse0;
518 Node* efalse0 = effect;
519 Node* if_false0 = graph()->NewNode(common()->IfFalse(), branch0);
522 Node* index = efalse0 = graph()->NewNode(
528 Node* buffer = efalse0 = graph()->NewNode(
540 Node* check1 = efalse0 = graph()->NewNode(
547 Node* length = efalse0 = graph()->NewNode(
551 Node* check2 =
553 Node* branch2 = graph()->NewNode(common()->Branch(BranchHint::kTrue),
556 Node* vdone_true2;
557 Node* vtrue2;
558 Node* etrue2 = efalse0;
559 Node* if_true2 = graph()->NewNode(common()->IfTrue(), branch2);
567 Node* next_index = graph()->NewNode(simplified()->NumberAdd(), index,
577 Node* elements = etrue2 = graph()->NewNode(
580 Node* base_ptr = etrue2 = graph()->NewNode(
584 Node* external_ptr = etrue2 = graph()->NewNode(
601 Node* value = etrue2 =
617 Node* vdone_false2;
618 Node* vfalse2;
619 Node* efalse2 = efalse0;
620 Node* if_false2 = graph()->NewNode(common()->IfFalse(), branch2);
640 Node* vdone_true0;
641 Node* vtrue0;
642 Node* etrue0 = effect;
643 Node* if_true0 = graph()->NewNode(common()->IfTrue(), branch0);
652 Node* value =
655 Node* done =
662 ReplaceWithValue(node, value, effect, control);
666 Reduction JSBuiltinReducer::ReduceArrayIteratorNext(Node* node) {
668 if (GetMapWitness(node).ToHandle(&receiver_map)) {
671 return ReduceTypedArrayIteratorNext(receiver_map, node,
675 return ReduceFastArrayIteratorNext(receiver_map, node,
687 return ReduceTypedArrayIteratorNext(receiver_map, node,
696 return ReduceFastArrayIteratorNext(receiver_map, node,
708 return ReduceTypedArrayIteratorNext(receiver_map, node,
717 return ReduceFastArrayIteratorNext(receiver_map, node,
729 Reduction JSBuiltinReducer::ReduceArrayPop(Node* node) {
731 Node* receiver = NodeProperties::GetValueInput(node, 1);
732 Node* effect = NodeProperties::GetEffectInput(node);
733 Node* control = NodeProperties::GetControlInput(node);
736 if (GetMapWitness(node).ToHandle(&receiver_map) &&
745 Node* length = effect = graph()->NewNode(
751 Node* check = graph()->NewNode(simplified()->NumberEqual(), length,
753 Node* branch =
756 Node* if_true = graph()->NewNode(common()->IfTrue(), branch);
757 Node* etrue = effect;
758 Node* vtrue = jsgraph()->UndefinedConstant();
760 Node* if_false = graph()->NewNode(common()->IfFalse(), branch);
761 Node* efalse = effect;
762 Node* vfalse;
765 Node* elements = efalse = graph()->NewNode(
799 Node* value =
810 ReplaceWithValue(node, value, effect, control);
817 Reduction JSBuiltinReducer::ReduceArrayPush(Node* node) {
819 if (node->op()->ValueInputCount() != 3) return NoChange();
820 Node* receiver = NodeProperties::GetValueInput(node, 1);
821 Node* effect = NodeProperties::GetEffectInput(node);
822 Node* control = NodeProperties::GetControlInput(node);
823 Node* value = NodeProperties::GetValueInput(node, 2);
873 Node* length = effect = graph()->NewNode(
879 Node* elements = effect = graph()->NewNode(
905 ReplaceWithValue(node, value, effect, control);
913 bool HasInstanceTypeWitness(Node* receiver, Node* effect,
915 for (Node* dominator = effect;;) {
933 // Didn't find any appropriate CheckMaps node.
943 Reduction JSBuiltinReducer::ReduceDateNow(Node* node) {
944 NodeProperties::RemoveValueInputs(node);
946 node, javascript()->CallRuntime(Runtime::kDateCurrentTime));
947 return Changed(node);
951 Reduction JSBuiltinReducer::ReduceDateGetTime(Node* node) {
952 Node* receiver = NodeProperties::GetValueInput(node, 1);
953 Node* effect = NodeProperties::GetEffectInput(node);
954 Node* control = NodeProperties::GetControlInput(node);
956 Node* value = effect = graph()->NewNode(
959 ReplaceWithValue(node, value, effect, control);
966 Reduction JSBuiltinReducer::ReduceGlobalIsFinite(Node* node) {
967 JSCallReduction r(node);
971 Node* input = ToNumber(r.GetJSCallInput(0));
972 Node* diff = graph()->NewNode(simplified()->NumberSubtract(), input, input);
973 Node* value = graph()->NewNode(simplified()->NumberEqual(), diff, diff);
980 Reduction JSBuiltinReducer::ReduceGlobalIsNaN(Node* node) {
981 JSCallReduction r(node);
985 Node* input = ToNumber(r.GetJSCallInput(0));
986 Node* check = graph()->NewNode(simplified()->NumberEqual(), input, input);
987 Node* value = graph()->NewNode(simplified()->BooleanNot(), check);
994 Reduction JSBuiltinReducer::ReduceMathAbs(Node* node) {
995 JSCallReduction r(node);
998 Node* input = ToNumber(r.GetJSCallInput(0));
999 Node* value = graph()->NewNode(simplified()->NumberAbs(), input);
1006 Reduction JSBuiltinReducer::ReduceMathAcos(Node* node) {
1007 JSCallReduction r(node);
1010 Node* input = ToNumber(r.GetJSCallInput(0));
1011 Node* value = graph()->NewNode(simplified()->NumberAcos(), input);
1018 Reduction JSBuiltinReducer::ReduceMathAcosh(Node* node) {
1019 JSCallReduction r(node);
1022 Node* input = ToNumber(r.GetJSCallInput(0));
1023 Node* value = graph()->NewNode(simplified()->NumberAcosh(), input);
1030 Reduction JSBuiltinReducer::ReduceMathAsin(Node* node) {
1031 JSCallReduction r(node);
1034 Node* input = ToNumber(r.GetJSCallInput(0));
1035 Node* value = graph()->NewNode(simplified()->NumberAsin(), input);
1042 Reduction JSBuiltinReducer::ReduceMathAsinh(Node* node) {
1043 JSCallReduction r(node);
1046 Node* input = ToNumber(r.GetJSCallInput(0));
1047 Node* value = graph()->NewNode(simplified()->NumberAsinh(), input);
1054 Reduction JSBuiltinReducer::ReduceMathAtan(Node* node) {
1055 JSCallReduction r(node);
1058 Node* input = ToNumber(r.GetJSCallInput(0));
1059 Node* value = graph()->NewNode(simplified()->NumberAtan(), input);
1066 Reduction JSBuiltinReducer::ReduceMathAtanh(Node* node) {
1067 JSCallReduction r(node);
1070 Node* input = ToNumber(r.GetJSCallInput(0));
1071 Node* value = graph()->NewNode(simplified()->NumberAtanh(), input);
1078 Reduction JSBuiltinReducer::ReduceMathAtan2(Node* node) {
1079 JSCallReduction r(node);
1084 Node* left = ToNumber(r.left());
1085 Node* right = ToNumber(r.right());
1086 Node* value = graph()->NewNode(simplified()->NumberAtan2(), left, right);
1093 Reduction JSBuiltinReducer::ReduceMathCeil(Node* node) {
1094 JSCallReduction r(node);
1097 Node* input = ToNumber(r.GetJSCallInput(0));
1098 Node* value = graph()->NewNode(simplified()->NumberCeil(), input);
1105 Reduction JSBuiltinReducer::ReduceMathClz32(Node* node) {
1106 JSCallReduction r(node);
1109 Node* input = ToUint32(r.GetJSCallInput(0));
1110 Node* value = graph()->NewNode(simplified()->NumberClz32(), input);
1117 Reduction JSBuiltinReducer::ReduceMathCos(Node* node) {
1118 JSCallReduction r(node);
1121 Node* input = ToNumber(r.GetJSCallInput(0));
1122 Node* value = graph()->NewNode(simplified()->NumberCos(), input);
1129 Reduction JSBuiltinReducer::ReduceMathCosh(Node* node) {
1130 JSCallReduction r(node);
1133 Node* input = ToNumber(r.GetJSCallInput(0));
1134 Node* value = graph()->NewNode(simplified()->NumberCosh(), input);
1141 Reduction JSBuiltinReducer::ReduceMathExp(Node* node) {
1142 JSCallReduction r(node);
1145 Node* input = ToNumber(r.GetJSCallInput(0));
1146 Node* value = graph()->NewNode(simplified()->NumberExp(), input);
1153 Reduction JSBuiltinReducer::ReduceMathExpm1(Node* node) {
1154 JSCallReduction r(node);
1157 Node* value = graph()->NewNode(simplified()->NumberExpm1(), r.left());
1164 Reduction JSBuiltinReducer::ReduceMathFloor(Node* node) {
1165 JSCallReduction r(node);
1168 Node* input = ToNumber(r.GetJSCallInput(0));
1169 Node* value = graph()->NewNode(simplified()->NumberFloor(), input);
1176 Reduction JSBuiltinReducer::ReduceMathFround(Node* node) {
1177 JSCallReduction r(node);
1180 Node* input = ToNumber(r.GetJSCallInput(0));
1181 Node* value = graph()->NewNode(simplified()->NumberFround(), input);
1188 Reduction JSBuiltinReducer::ReduceMathImul(Node* node) {
1189 JSCallReduction r(node);
1194 Node* left = ToUint32(r.left());
1195 Node* right = ToUint32(r.right());
1196 Node
1203 Reduction JSBuiltinReducer::ReduceMathLog(Node* node) {
1204 JSCallReduction r(node);
1207 Node* input = ToNumber(r.GetJSCallInput(0));
1208 Node* value = graph()->NewNode(simplified()->NumberLog(), input);
1215 Reduction JSBuiltinReducer::ReduceMathLog1p(Node* node) {
1216 JSCallReduction r(node);
1219 Node* input = ToNumber(r.GetJSCallInput(0));
1220 Node* value = graph()->NewNode(simplified()->NumberLog1p(), input);
1227 Reduction JSBuiltinReducer::ReduceMathLog10(Node* node) {
1228 JSCallReduction r(node);
1231 Node* value = graph()->NewNode(simplified()->NumberLog10(), r.left());
1238 Reduction JSBuiltinReducer::ReduceMathLog2(Node* node) {
1239 JSCallReduction r(node);
1242 Node* value = graph()->NewNode(simplified()->NumberLog2(), r.left());
1249 Reduction JSBuiltinReducer::ReduceMathMax(Node* node) {
1250 JSCallReduction r(node);
1257 Node* value = ToNumber(r.GetJSCallInput(0));
1259 Node* input = ToNumber(r.GetJSCallInput(i));
1268 Reduction JSBuiltinReducer::ReduceMathMin(Node* node) {
1269 JSCallReduction r(node);
1276 Node* value = ToNumber(r.GetJSCallInput(0));
1278 Node* input = ToNumber(r.GetJSCallInput(i));
1287 Reduction JSBuiltinReducer::ReduceMathPow(Node* node) {
1288 JSCallReduction r(node);
1292 Node* left = ToNumber(r.left());
1293 Node* right = ToNumber(r.right());
1294 Node* value = graph()->NewNode(simplified()->NumberPow(), left, right);
1301 Reduction JSBuiltinReducer::ReduceMathRound(Node* node) {
1302 JSCallReduction r(node);
1305 Node* input = ToNumber(r.GetJSCallInput(0));
1306 Node* value = graph()->NewNode(simplified()->NumberRound(), input);
1313 Reduction JSBuiltinReducer::ReduceMathCbrt(Node* node) {
1314 JSCallReduction r(node);
1317 Node* value = graph()->NewNode(simplified()->NumberCbrt(), r.left());
1324 Reduction JSBuiltinReducer::ReduceMathSign(Node* node) {
1325 JSCallReduction r(node);
1328 Node* input = ToNumber(r.GetJSCallInput(0));
1329 Node* value = graph()->NewNode(simplified()->NumberSign(), input);
1336 Reduction JSBuiltinReducer::ReduceMathSin(Node* node) {
1337 JSCallReduction r(node);
1340 Node* input = ToNumber(r.GetJSCallInput(0));
1341 Node* value = graph()->NewNode(simplified()->NumberSin(), input);
1348 Reduction JSBuiltinReducer::ReduceMathSinh(Node* node) {
1349 JSCallReduction r(node);
1352 Node* input = ToNumber(r.GetJSCallInput(0));
1353 Node* value = graph()->NewNode(simplified()->NumberSinh(), input);
1360 Reduction JSBuiltinReducer::ReduceMathSqrt(Node* node) {
1361 JSCallReduction r(node);
1364 Node* input = ToNumber(r.GetJSCallInput(0));
1365 Node* value = graph()->NewNode(simplified()->NumberSqrt(), input);
1372 Reduction JSBuiltinReducer::ReduceMathTan(Node* node) {
1373 JSCallReduction r(node);
1376 Node* input = ToNumber(r.GetJSCallInput(0));
1377 Node* value = graph()->NewNode(simplified()->NumberTan(), input);
1384 Reduction JSBuiltinReducer::ReduceMathTanh(Node* node) {
1385 JSCallReduction r(node);
1388 Node* input = ToNumber(r.GetJSCallInput(0));
1389 Node* value = graph()->NewNode(simplified()->NumberTanh(), input);
1396 Reduction JSBuiltinReducer::ReduceMathTrunc(Node* node) {
1397 JSCallReduction r(node);
1400 Node* input = ToNumber(r.GetJSCallInput(0));
1401 Node* value = graph()->NewNode(simplified()->NumberTrunc(), input);
1408 Reduction JSBuiltinReducer::ReduceNumberIsFinite(Node* node) {
1409 JSCallReduction r(node);
1413 Node* input = r.GetJSCallInput(0);
1414 Node* diff = graph()->NewNode(simplified()->NumberSubtract(), input, input);
1415 Node* value = graph()->NewNode(simplified()->NumberEqual(), diff, diff);
1422 Reduction JSBuiltinReducer::ReduceNumberIsInteger(Node* node) {
1423 JSCallReduction r(node);
1427 Node* input = r.GetJSCallInput(0);
1428 Node* trunc = graph()->NewNode(simplified()->NumberTrunc(), input);
1429 Node* diff = graph()->NewNode(simplified()->NumberSubtract(), input, trunc);
1430 Node* value = graph()->NewNode(simplified()->NumberEqual(), diff,
1438 Reduction JSBuiltinReducer::ReduceNumberIsNaN(Node* node) {
1439 JSCallReduction r(node);
1442 Node* input = r.GetJSCallInput(0);
1443 Node* check = graph()->NewNode(simplified()->NumberEqual(), input, input);
1444 Node* value = graph()->NewNode(simplified()->BooleanNot(), check);
1451 Reduction JSBuiltinReducer::ReduceNumberIsSafeInteger(Node* node) {
1452 JSCallReduction r(node);
1455 Node* value = jsgraph()->TrueConstant();
1462 Reduction JSBuiltinReducer::ReduceNumberParseInt(Node* node) {
1463 JSCallReduction r(node);
1471 Node* value = r.GetJSCallInput(0);
1478 Reduction JSBuiltinReducer::ReduceObjectCreate(Node* node) {
1480 int arg_count = node->op()->ValueInputCount();
1482 Node* effect = NodeProperties::GetEffectInput(node);
1483 Node* control = NodeProperties::GetControlInput(node);
1484 Node* prototype = NodeProperties::GetValueInput(node, 2);
1494 Node* properties = jsgraph()->EmptyFixedArrayConstant();
1507 Node* value = effect =
1531 Node* undefined = jsgraph()->UndefinedConstant();
1560 Node* value = effect =
1573 Node* undefined = jsgraph()->UndefinedConstant();
1584 ReplaceWithValue(node, value, effect, control);
1589 Reduction JSBuiltinReducer::ReduceStringFromCharCode(Node* node) {
1590 JSCallReduction r(node);
1593 Node* input = ToNumber(r.GetJSCallInput(0));
1594 Node* value = graph()->NewNode(simplified()->StringFromCharCode(), input);
1602 Node* GetStringWitness(Node* node) {
1603 Node* receiver = NodeProperties::GetValueInput(node, 1);
1605 Node* effect = NodeProperties::GetEffectInput(node);
1607 // Check if the {node} is dominated by a CheckString renaming for
1610 for (Node* dominator = effect;;) {
1616 // Didn't find any appropriate CheckString node.
1626 Reduction JSBuiltinReducer::ReduceStringCharAt(Node* node) {
1628 node->op()->ValueInputCount() >= 3) {
1629 Node* index = NodeProperties::GetValueInput(node, 2);
1631 Node* effect = NodeProperties::GetEffectInput(node);
1632 Node* control = NodeProperties::GetControlInput(node);
1635 if (Node* receiver = GetStringWitness(node)) {
1646 Node* receiver_length = effect = graph()->NewNode(
1651 Node* check = graph()->NewNode(simplified()->NumberLessThan(), index,
1653 Node* branch = graph()->NewNode(common()->Branch(BranchHint::kTrue),
1657 Node* if_true = graph()->NewNode(common()->IfTrue(), branch);
1658 Node* vtrue = graph()->NewNode(simplified()->StringCharAt(), receiver,
1662 Node* if_false = graph()->NewNode(common()->IfFalse(), branch);
1663 Node* vfalse = jsgraph()->EmptyStringConstant();
1666 Node* value =
1670 ReplaceWithValue(node, value, effect, control);
1680 Reduction JSBuiltinReducer::ReduceStringCharCodeAt(Node* node) {
1682 if (node->op()->ValueInputCount() >= 3) {
1683 Node* index = NodeProperties::GetValueInput(node, 2);
1685 Node* effect = NodeProperties::GetEffectInput(node);
1686 Node* control = NodeProperties::GetControlInput(node);
1689 if (Node* receiver = GetStringWitness(node)) {
1700 Node* receiver_length = effect = graph()->NewNode(
1705 Node* check = graph()->NewNode(simplified()->NumberLessThan(), index,
1707 Node* branch = graph()->NewNode(common()->Branch(BranchHint::kTrue),
1711 Node* if_true = graph()->NewNode(common()->IfTrue(), branch);
1712 Node* vtrue = graph()->NewNode(simplified()->StringCharCodeAt(),
1716 Node* if_false = graph()->NewNode(common()->IfFalse(), branch);
1717 Node* vfalse = jsgraph()->NaNConstant();
1720 Node* value =
1724 ReplaceWithValue(node, value, effect, control);
1735 Reduction JSBuiltinReducer::ReduceStringIndexOf(Node* node) {
1737 if (node->op()->ValueInputCount() >= 3) {
1738 Node* search_string = NodeProperties::GetValueInput(node, 2);
1740 Node* position = (node->op()->ValueInputCount() >= 4)
1741 ? NodeProperties::GetValueInput(node, 3)
1747 if (Node* receiver = GetStringWitness(node)) {
1748 RelaxEffectsAndControls(node);
1749 node->ReplaceInput(0, receiver);
1750 node->ReplaceInput(1, search_string);
1751 node->ReplaceInput(2, position);
1752 node->TrimInputCount(3);
1753 NodeProperties::ChangeOp(node, simplified()->StringIndexOf());
1754 return Changed(node);
1761 Reduction JSBuiltinReducer::ReduceStringIterator(Node* node) {
1762 if (Node* receiver = GetStringWitness(node)) {
1763 Node* effect = NodeProperties::GetEffectInput(node);
1764 Node* control = NodeProperties::GetControlInput(node);
1766 Node* map = jsgraph()->HeapConstant(
1772 Node* value = effect = graph()->NewNode(
1796 ReplaceWithValue(node, value, effect, control);
1802 Reduction JSBuiltinReducer::ReduceStringIteratorNext(Node* node) {
1803 Node* receiver = NodeProperties::GetValueInput(node, 1);
1804 Node* effect = NodeProperties::GetEffectInput(node);
1805 Node* control = NodeProperties::GetControlInput(node);
1806 Node* context = NodeProperties::GetContextInput(node);
1808 Node* string = effect = graph()->NewNode(
1811 Node* index = effect = graph()->NewNode(
1814 Node* length = effect = graph()->NewNode(
1819 Node* check0 =
1821 Node* branch0 =
1824 Node* etrue0 = effect;
1825 Node* if_true0 = graph()->NewNode(common()->IfTrue(), branch0);
1826 Node* done_true;
1827 Node* vtrue0;
1830 Node* lead = graph()->NewNode(simplified()->StringCharCodeAt(), string,
1834 Node* check1 =
1839 Node* branch1 = graph()->NewNode(common()->Branch(BranchHint::kFalse),
1841 Node* if_true1 = graph()->NewNode(common()->IfTrue(), branch1);
1842 Node* vtrue1;
1844 Node* next_index = graph()->NewNode(simplified()->NumberAdd(), index,
1847 Node* check2 = graph()->NewNode(simplified()->NumberLessThan(),
1849 Node* branch2 = graph()->NewNode(common()->Branch(BranchHint::kTrue),
1851 Node* if_true2 = graph()->NewNode(common()->IfTrue(), branch2);
1852 Node* vtrue2;
1854 Node* trail = graph()->NewNode(simplified()->StringCharCodeAt(),
1857 Node* check3 = graph()->NewNode(
1862 Node* branch3 = graph()->NewNode(common()->Branch(BranchHint::kTrue),
1864 Node* if_true3 = graph()->NewNode(common()->IfTrue(), branch3);
1865 Node* vtrue3;
1881 Node* if_false3 = graph()->NewNode(common()->IfFalse(), branch3);
1882 Node* vfalse3 = lead;
1889 Node* if_false2 = graph()->NewNode(common()->IfFalse(), branch2);
1890 Node* vfalse2 = lead;
1897 Node* if_false1 = graph()->NewNode(common()->IfFalse(), branch1);
1898 Node* vfalse1 = lead;
1907 Node* char_length = etrue0 = graph()->NewNode(
1916 Node* if_false0 = graph()->NewNode(common()->IfFalse(), branch0);
1917 Node* done_false;
1918 Node* vfalse0;
1926 Node* value =
1929 Node* done =
1936 ReplaceWithValue(node, value, effect, control);
1943 Node* node, InstanceType instance_type, FieldAccess const& access) {
1944 Node* receiver = NodeProperties::GetValueInput(node, 1);
1945 Node* effect = NodeProperties::GetEffectInput(node);
1946 Node* control = NodeProperties::GetControlInput(node);
1949 Node* value = effect = graph()->NewNode(simplified()->LoadField(access),
1960 Node* receiver_buffer = effect = graph()->NewNode(
1963 Node* check = effect =
1973 ReplaceWithValue(node, value, effect, control);
1979 Reduction JSBuiltinReducer::Reduce(Node* node) {
1981 JSCallReduction r(node);
1987 return ReduceArrayIterator(node, IterationKind::kEntries);
1989 return ReduceArrayIterator(node, IterationKind::kKeys);
1991 return ReduceArrayIterator(node, IterationKind::kValues);
1993 return ReduceArrayIteratorNext(node);
1995 return ReduceArrayPop(node);
1997 return ReduceArrayPush(node);
1999 return ReduceDateNow(node);
2001 return ReduceDateGetTime(node);
2003 reduction = ReduceGlobalIsFinite(node);
2006 reduction = ReduceGlobalIsNaN(node);
2009 reduction = ReduceMathAbs(node);
2012 node);
2015 reduction = ReduceMathAcosh(node);
2018 reduction = ReduceMathAsin(node);
2021 reduction = ReduceMathAsinh(node);
2024 reduction = ReduceMathAtan(node);
2027 reduction = ReduceMathAtanh(node);
2030 reduction = ReduceMathAtan2(node);
2033 reduction = ReduceMathCbrt(node);
2036 reduction = ReduceMathCeil(node);
2039 reduction = ReduceMathClz32(node);
2042 reduction = ReduceMathCos(node);
2045 reduction = ReduceMathCosh(node);
2048 reduction = ReduceMathExp(node);
2051 reduction = ReduceMathExpm1(node);
2054 reduction = ReduceMathFloor(node);
2057 reduction = ReduceMathFround(node);
2060 reduction = ReduceMathImul(node);
2063 reduction = ReduceMathLog(node);
2066 reduction = ReduceMathLog1p(node);
2069 reduction = ReduceMathLog10(node);
2072 reduction = ReduceMathLog2(node);
2075 reduction = ReduceMathMax(node);
2078 reduction = ReduceMathMin(node);
2081 reduction = ReduceMathPow(node);
2084 reduction = ReduceMathRound(node);
2087 reduction = ReduceMathSign(node);
2090 reduction = ReduceMathSin(node);
2093 reduction = ReduceMathSinh(node);
2096 reduction = ReduceMathSqrt(node);
2099 reduction = ReduceMathTan(node);
2102 reduction = ReduceMathTanh(node);
2105 reduction = ReduceMathTrunc(node);
2108 reduction = ReduceNumberIsFinite(node);
2111 reduction = ReduceNumberIsInteger(node);
2114 reduction = ReduceNumberIsNaN(node);
2117 reduction = ReduceNumberIsSafeInteger(node);
2120 reduction = ReduceNumberParseInt(node);
2123 reduction = ReduceObjectCreate(node);
2126 reduction = ReduceStringFromCharCode(node);
2129 return ReduceStringCharAt(node);
2131 return ReduceStringCharCodeAt(node);
2133 return ReduceStringIndexOf(node);
2135 return ReduceStringIterator(node);
2137 return ReduceStringIteratorNext(node);
2140 node, JS_DATA_VIEW_TYPE,
2144 node, JS_DATA_VIEW_TYPE,
2148 node, JS_TYPED_ARRAY_TYPE,
2152 node, JS_TYPED_ARRAY_TYPE,
2156 node, JS_TYPED_ARRAY_TYPE, AccessBuilder::ForJSTypedArrayLength());
2158 return ReduceTypedArrayIterator(node, IterationKind::kEntries);
2160 return ReduceTypedArrayIterator(node, IterationKind::kKeys);
2162 return ReduceTypedArrayIterator(node, IterationKind::kValues);
2168 // produce an effect. Replaces {node} with {reduction} and relaxes effects.
2169 if (reduction.Changed()) ReplaceWithValue(node, reduction.replacement());
2174 Node* JSBuiltinReducer::ToNumber(Node* input) {
2180 Node* JSBuiltinReducer::ToUint32(Node* input) {