| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/code-factory.h" | 5 #include "src/code-factory.h" |
| 6 #include "src/compiler/access-builder.h" | 6 #include "src/compiler/access-builder.h" |
| 7 #include "src/compiler/js-graph.h" | 7 #include "src/compiler/js-graph.h" |
| 8 #include "src/compiler/js-typed-lowering.h" | 8 #include "src/compiler/js-typed-lowering.h" |
| 9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
| 10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
| (...skipping 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1515 Node* branch0 = | 1515 Node* branch0 = |
| 1516 graph()->NewNode(common()->Branch(BranchHint::kTrue), check0, control); | 1516 graph()->NewNode(common()->Branch(BranchHint::kTrue), check0, control); |
| 1517 | 1517 |
| 1518 Node* if_true0 = graph()->NewNode(common()->IfTrue(), branch0); | 1518 Node* if_true0 = graph()->NewNode(common()->IfTrue(), branch0); |
| 1519 Node* cache_array_true0; | 1519 Node* cache_array_true0; |
| 1520 Node* cache_length_true0; | 1520 Node* cache_length_true0; |
| 1521 Node* cache_type_true0; | 1521 Node* cache_type_true0; |
| 1522 Node* etrue0; | 1522 Node* etrue0; |
| 1523 { | 1523 { |
| 1524 // Enum cache case. | 1524 // Enum cache case. |
| 1525 Node* cache_type_enum_length = etrue0 = graph()->NewNode( | 1525 Node* cache_type_enum_length = etrue0 = |
| 1526 simplified()->LoadField(AccessBuilder::ForMapBitField3()), cache_type, | 1526 graph()->NewNode(simplified()->LoadField( |
| 1527 effect, if_true0); | 1527 AccessBuilder::ForMapBitField3(graph()->zone())), |
| 1528 cache_length_true0 = | 1528 cache_type, effect, if_true0); |
| 1529 graph()->NewNode(machine()->Word32And(), cache_type_enum_length, | 1529 cache_length_true0 = graph()->NewNode( |
| 1530 jsgraph()->Uint32Constant(Map::EnumLengthBits::kMask)); | 1530 simplified()->NumberBitwiseAnd(), cache_type_enum_length, |
| 1531 jsgraph()->Int32Constant(Map::EnumLengthBits::kMask)); |
| 1531 | 1532 |
| 1532 Node* check1 = | 1533 Node* check1 = |
| 1533 graph()->NewNode(machine()->Word32Equal(), cache_length_true0, | 1534 graph()->NewNode(machine()->Word32Equal(), cache_length_true0, |
| 1534 jsgraph()->Int32Constant(0)); | 1535 jsgraph()->Int32Constant(0)); |
| 1535 Node* branch1 = | 1536 Node* branch1 = |
| 1536 graph()->NewNode(common()->Branch(BranchHint::kTrue), check1, if_true0); | 1537 graph()->NewNode(common()->Branch(BranchHint::kTrue), check1, if_true0); |
| 1537 | 1538 |
| 1538 Node* if_true1 = graph()->NewNode(common()->IfTrue(), branch1); | 1539 Node* if_true1 = graph()->NewNode(common()->IfTrue(), branch1); |
| 1539 Node* cache_array_true1; | 1540 Node* cache_array_true1; |
| 1540 Node* etrue1; | 1541 Node* etrue1; |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1785 case IrOpcode::kJSStrictEqual: | 1786 case IrOpcode::kJSStrictEqual: |
| 1786 return ReduceJSStrictEqual(node, false); | 1787 return ReduceJSStrictEqual(node, false); |
| 1787 case IrOpcode::kJSStrictNotEqual: | 1788 case IrOpcode::kJSStrictNotEqual: |
| 1788 return ReduceJSStrictEqual(node, true); | 1789 return ReduceJSStrictEqual(node, true); |
| 1789 case IrOpcode::kJSLessThan: // fall through | 1790 case IrOpcode::kJSLessThan: // fall through |
| 1790 case IrOpcode::kJSGreaterThan: // fall through | 1791 case IrOpcode::kJSGreaterThan: // fall through |
| 1791 case IrOpcode::kJSLessThanOrEqual: // fall through | 1792 case IrOpcode::kJSLessThanOrEqual: // fall through |
| 1792 case IrOpcode::kJSGreaterThanOrEqual: | 1793 case IrOpcode::kJSGreaterThanOrEqual: |
| 1793 return ReduceJSComparison(node); | 1794 return ReduceJSComparison(node); |
| 1794 case IrOpcode::kJSBitwiseOr: | 1795 case IrOpcode::kJSBitwiseOr: |
| 1795 return ReduceInt32Binop(node, machine()->Word32Or()); | 1796 return ReduceInt32Binop(node, simplified()->NumberBitwiseOr()); |
| 1796 case IrOpcode::kJSBitwiseXor: | 1797 case IrOpcode::kJSBitwiseXor: |
| 1797 return ReduceInt32Binop(node, machine()->Word32Xor()); | 1798 return ReduceInt32Binop(node, simplified()->NumberBitwiseXor()); |
| 1798 case IrOpcode::kJSBitwiseAnd: | 1799 case IrOpcode::kJSBitwiseAnd: |
| 1799 return ReduceInt32Binop(node, machine()->Word32And()); | 1800 return ReduceInt32Binop(node, simplified()->NumberBitwiseAnd()); |
| 1800 case IrOpcode::kJSShiftLeft: | 1801 case IrOpcode::kJSShiftLeft: |
| 1801 return ReduceUI32Shift(node, kSigned, simplified()->NumberShiftLeft()); | 1802 return ReduceUI32Shift(node, kSigned, simplified()->NumberShiftLeft()); |
| 1802 case IrOpcode::kJSShiftRight: | 1803 case IrOpcode::kJSShiftRight: |
| 1803 return ReduceUI32Shift(node, kSigned, simplified()->NumberShiftRight()); | 1804 return ReduceUI32Shift(node, kSigned, simplified()->NumberShiftRight()); |
| 1804 case IrOpcode::kJSShiftRightLogical: | 1805 case IrOpcode::kJSShiftRightLogical: |
| 1805 return ReduceUI32Shift(node, kUnsigned, | 1806 return ReduceUI32Shift(node, kUnsigned, |
| 1806 simplified()->NumberShiftRightLogical()); | 1807 simplified()->NumberShiftRightLogical()); |
| 1807 case IrOpcode::kJSAdd: | 1808 case IrOpcode::kJSAdd: |
| 1808 return ReduceJSAdd(node); | 1809 return ReduceJSAdd(node); |
| 1809 case IrOpcode::kJSSubtract: | 1810 case IrOpcode::kJSSubtract: |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1917 } | 1918 } |
| 1918 | 1919 |
| 1919 | 1920 |
| 1920 MachineOperatorBuilder* JSTypedLowering::machine() const { | 1921 MachineOperatorBuilder* JSTypedLowering::machine() const { |
| 1921 return jsgraph()->machine(); | 1922 return jsgraph()->machine(); |
| 1922 } | 1923 } |
| 1923 | 1924 |
| 1924 } // namespace compiler | 1925 } // namespace compiler |
| 1925 } // namespace internal | 1926 } // namespace internal |
| 1926 } // namespace v8 | 1927 } // namespace v8 |
| OLD | NEW |