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

Side by Side Diff: src/compiler/js-typed-lowering.cc

Issue 1418993002: [turbofan] Unify NamedAccess and PropertyAccess operator parameters. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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
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/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 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 return NoChange(); 819 return NoChange();
820 } 820 }
821 821
822 822
823 Reduction JSTypedLowering::ReduceJSLoadNamed(Node* node) { 823 Reduction JSTypedLowering::ReduceJSLoadNamed(Node* node) {
824 DCHECK_EQ(IrOpcode::kJSLoadNamed, node->opcode()); 824 DCHECK_EQ(IrOpcode::kJSLoadNamed, node->opcode());
825 Node* receiver = NodeProperties::GetValueInput(node, 0); 825 Node* receiver = NodeProperties::GetValueInput(node, 0);
826 Type* receiver_type = NodeProperties::GetType(receiver); 826 Type* receiver_type = NodeProperties::GetType(receiver);
827 Node* effect = NodeProperties::GetEffectInput(node); 827 Node* effect = NodeProperties::GetEffectInput(node);
828 Node* control = NodeProperties::GetControlInput(node); 828 Node* control = NodeProperties::GetControlInput(node);
829 Handle<Name> name = LoadNamedParametersOf(node->op()).name(); 829 Handle<Name> name = NamedAccessOf(node->op()).name();
830 // Optimize "length" property of strings. 830 // Optimize "length" property of strings.
831 if (name.is_identical_to(factory()->length_string()) && 831 if (name.is_identical_to(factory()->length_string()) &&
832 receiver_type->Is(Type::String())) { 832 receiver_type->Is(Type::String())) {
833 Node* value = effect = 833 Node* value = effect =
834 graph()->NewNode(simplified()->LoadField( 834 graph()->NewNode(simplified()->LoadField(
835 AccessBuilder::ForStringLength(graph()->zone())), 835 AccessBuilder::ForStringLength(graph()->zone())),
836 receiver, effect, control); 836 receiver, effect, control);
837 ReplaceWithValue(node, value, effect); 837 ReplaceWithValue(node, value, effect);
838 return Replace(value); 838 return Replace(value);
839 } 839 }
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after
1840 } 1840 }
1841 1841
1842 1842
1843 MachineOperatorBuilder* JSTypedLowering::machine() const { 1843 MachineOperatorBuilder* JSTypedLowering::machine() const {
1844 return jsgraph()->machine(); 1844 return jsgraph()->machine();
1845 } 1845 }
1846 1846
1847 } // namespace compiler 1847 } // namespace compiler
1848 } // namespace internal 1848 } // namespace internal
1849 } // namespace v8 1849 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-type-feedback-lowering.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698