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

Side by Side Diff: src/compiler/js-type-feedback-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
« no previous file with comments | « src/compiler/js-type-feedback.cc ('k') | src/compiler/js-typed-lowering.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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-type-feedback-lowering.h" 5 #include "src/compiler/js-type-feedback-lowering.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-properties.h" 9 #include "src/compiler/node-properties.h"
10 #include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker! 10 #include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker!
(...skipping 21 matching lines...) Expand all
32 32
33 Reduction JSTypeFeedbackLowering::ReduceJSLoadNamed(Node* node) { 33 Reduction JSTypeFeedbackLowering::ReduceJSLoadNamed(Node* node) {
34 DCHECK_EQ(IrOpcode::kJSLoadNamed, node->opcode()); 34 DCHECK_EQ(IrOpcode::kJSLoadNamed, node->opcode());
35 Node* receiver = NodeProperties::GetValueInput(node, 0); 35 Node* receiver = NodeProperties::GetValueInput(node, 0);
36 Type* receiver_type = NodeProperties::GetType(receiver); 36 Type* receiver_type = NodeProperties::GetType(receiver);
37 Node* frame_state = NodeProperties::GetFrameStateInput(node, 1); 37 Node* frame_state = NodeProperties::GetFrameStateInput(node, 1);
38 Node* effect = NodeProperties::GetEffectInput(node); 38 Node* effect = NodeProperties::GetEffectInput(node);
39 Node* control = NodeProperties::GetControlInput(node); 39 Node* control = NodeProperties::GetControlInput(node);
40 // We need to make optimistic assumptions to continue. 40 // We need to make optimistic assumptions to continue.
41 if (!(flags() & kDeoptimizationEnabled)) return NoChange(); 41 if (!(flags() & kDeoptimizationEnabled)) return NoChange();
42 LoadNamedParameters const& p = LoadNamedParametersOf(node->op()); 42 NamedAccess const& p = NamedAccessOf(node->op());
43 if (!p.feedback().IsValid()) return NoChange(); // No feedback. 43 if (!p.feedback().IsValid()) return NoChange(); // No feedback.
44 if (p.name().is_identical_to(factory()->length_string())) { 44 if (p.name().is_identical_to(factory()->length_string())) {
45 LoadICNexus nexus(p.feedback().vector(), p.feedback().slot()); 45 LoadICNexus nexus(p.feedback().vector(), p.feedback().slot());
46 MapHandleList maps; 46 MapHandleList maps;
47 if (nexus.ExtractMaps(&maps) > 0) { 47 if (nexus.ExtractMaps(&maps) > 0) {
48 for (Handle<Map> map : maps) { 48 for (Handle<Map> map : maps) {
49 if (map->instance_type() >= FIRST_NONSTRING_TYPE) return NoChange(); 49 if (map->instance_type() >= FIRST_NONSTRING_TYPE) return NoChange();
50 } 50 }
51 // Optimistic optimization for "length" property of strings. 51 // Optimistic optimization for "length" property of strings.
52 if (receiver_type->Maybe(Type::TaggedSigned())) { 52 if (receiver_type->Maybe(Type::TaggedSigned())) {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 } 112 }
113 113
114 114
115 SimplifiedOperatorBuilder* JSTypeFeedbackLowering::simplified() const { 115 SimplifiedOperatorBuilder* JSTypeFeedbackLowering::simplified() const {
116 return jsgraph()->simplified(); 116 return jsgraph()->simplified();
117 } 117 }
118 118
119 } // namespace compiler 119 } // namespace compiler
120 } // namespace internal 120 } // namespace internal
121 } // namespace v8 121 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-type-feedback.cc ('k') | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698