Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/compiler/js-builtin-reducer.cc

Issue 2203693002: [turbofan] Introduce initial support for TypedArrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5254
Patch Set: Fix Retain Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/js-native-context-specialization.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/js-native-context-specialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698