| 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/compiler/js-builtin-reducer.h" | 5 #include "src/compiler/js-builtin-reducer.h" |
| 6 | 6 |
| 7 #include "src/compilation-dependencies.h" | 7 #include "src/compilation-dependencies.h" |
| 8 #include "src/compiler/access-builder.h" | 8 #include "src/compiler/access-builder.h" |
| 9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
| 10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
| (...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 graph()->NewNode(simplified()->NumberBitwiseAnd(), trail, | 1134 graph()->NewNode(simplified()->NumberBitwiseAnd(), trail, |
| 1135 jsgraph()->Int32Constant(0xFC00)), | 1135 jsgraph()->Int32Constant(0xFC00)), |
| 1136 jsgraph()->Int32Constant(0xDC00)); | 1136 jsgraph()->Int32Constant(0xDC00)); |
| 1137 Node* branch3 = graph()->NewNode(common()->Branch(BranchHint::kTrue), | 1137 Node* branch3 = graph()->NewNode(common()->Branch(BranchHint::kTrue), |
| 1138 check3, if_true2); | 1138 check3, if_true2); |
| 1139 Node* if_true3 = graph()->NewNode(common()->IfTrue(), branch3); | 1139 Node* if_true3 = graph()->NewNode(common()->IfTrue(), branch3); |
| 1140 Node* vtrue3; | 1140 Node* vtrue3; |
| 1141 { | 1141 { |
| 1142 vtrue3 = graph()->NewNode( | 1142 vtrue3 = graph()->NewNode( |
| 1143 simplified()->NumberBitwiseOr(), | 1143 simplified()->NumberBitwiseOr(), |
| 1144 // Need to swap the order for big-endian platforms |
| 1145 #if V8_TARGET_BIG_ENDIAN |
| 1146 graph()->NewNode(simplified()->NumberShiftLeft(), lead, |
| 1147 jsgraph()->Int32Constant(16)), |
| 1148 trail); |
| 1149 #else |
| 1144 graph()->NewNode(simplified()->NumberShiftLeft(), trail, | 1150 graph()->NewNode(simplified()->NumberShiftLeft(), trail, |
| 1145 jsgraph()->Int32Constant(16)), | 1151 jsgraph()->Int32Constant(16)), |
| 1146 lead); | 1152 lead); |
| 1153 #endif |
| 1147 } | 1154 } |
| 1148 | 1155 |
| 1149 Node* if_false3 = graph()->NewNode(common()->IfFalse(), branch3); | 1156 Node* if_false3 = graph()->NewNode(common()->IfFalse(), branch3); |
| 1150 Node* vfalse3 = lead; | 1157 Node* vfalse3 = lead; |
| 1151 if_true2 = graph()->NewNode(common()->Merge(2), if_true3, if_false3); | 1158 if_true2 = graph()->NewNode(common()->Merge(2), if_true3, if_false3); |
| 1152 vtrue2 = | 1159 vtrue2 = |
| 1153 graph()->NewNode(common()->Phi(MachineRepresentation::kWord32, 2), | 1160 graph()->NewNode(common()->Phi(MachineRepresentation::kWord32, 2), |
| 1154 vtrue3, vfalse3, if_true2); | 1161 vtrue3, vfalse3, if_true2); |
| 1155 } | 1162 } |
| 1156 | 1163 |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1439 return jsgraph()->simplified(); | 1446 return jsgraph()->simplified(); |
| 1440 } | 1447 } |
| 1441 | 1448 |
| 1442 JSOperatorBuilder* JSBuiltinReducer::javascript() const { | 1449 JSOperatorBuilder* JSBuiltinReducer::javascript() const { |
| 1443 return jsgraph()->javascript(); | 1450 return jsgraph()->javascript(); |
| 1444 } | 1451 } |
| 1445 | 1452 |
| 1446 } // namespace compiler | 1453 } // namespace compiler |
| 1447 } // namespace internal | 1454 } // namespace internal |
| 1448 } // namespace v8 | 1455 } // namespace v8 |
| OLD | NEW |