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/compiler/access-builder.h" | 7 #include "src/compiler/access-builder.h" |
8 #include "src/compiler/js-graph.h" | 8 #include "src/compiler/js-graph.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 simplified()->LoadField(AccessBuilder::ForJSArrayBufferBitField()), | 725 simplified()->LoadField(AccessBuilder::ForJSArrayBufferBitField()), |
726 receiver_buffer, effect, control); | 726 receiver_buffer, effect, control); |
727 Node* check = graph()->NewNode( | 727 Node* check = graph()->NewNode( |
728 simplified()->NumberEqual(), | 728 simplified()->NumberEqual(), |
729 graph()->NewNode( | 729 graph()->NewNode( |
730 simplified()->NumberBitwiseAnd(), receiver_buffer_bitfield, | 730 simplified()->NumberBitwiseAnd(), receiver_buffer_bitfield, |
731 jsgraph()->Constant(JSArrayBuffer::WasNeutered::kMask)), | 731 jsgraph()->Constant(JSArrayBuffer::WasNeutered::kMask)), |
732 jsgraph()->ZeroConstant()); | 732 jsgraph()->ZeroConstant()); |
733 | 733 |
734 // Default to zero if the {receiver}s buffer was neutered. | 734 // Default to zero if the {receiver}s buffer was neutered. |
735 Node* value = | 735 Node* value = graph()->NewNode( |
736 graph()->NewNode(common()->Select(MachineRepresentation::kTagged), | 736 common()->Select(MachineRepresentation::kTagged, BranchHint::kTrue), |
737 check, receiver_length, jsgraph()->ZeroConstant()); | 737 check, receiver_length, jsgraph()->ZeroConstant()); |
738 | 738 |
739 ReplaceWithValue(node, value, effect, control); | 739 ReplaceWithValue(node, value, effect, control); |
740 return Replace(value); | 740 return Replace(value); |
741 } | 741 } |
742 return NoChange(); | 742 return NoChange(); |
743 } | 743 } |
744 | 744 |
745 Reduction JSBuiltinReducer::Reduce(Node* node) { | 745 Reduction JSBuiltinReducer::Reduce(Node* node) { |
746 Reduction reduction = NoChange(); | 746 Reduction reduction = NoChange(); |
747 JSCallReduction r(node); | 747 JSCallReduction r(node); |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 } | 912 } |
913 | 913 |
914 | 914 |
915 SimplifiedOperatorBuilder* JSBuiltinReducer::simplified() const { | 915 SimplifiedOperatorBuilder* JSBuiltinReducer::simplified() const { |
916 return jsgraph()->simplified(); | 916 return jsgraph()->simplified(); |
917 } | 917 } |
918 | 918 |
919 } // namespace compiler | 919 } // namespace compiler |
920 } // namespace internal | 920 } // namespace internal |
921 } // namespace v8 | 921 } // namespace v8 |
OLD | NEW |