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-type-feedback-lowering.cc

Issue 1407533004: [turbofan] Fix various issues with --turbo-inlining enabled. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment. Created 5 years, 2 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/js-operator.h ('k') | src/compiler/node-properties.h » ('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 25 matching lines...) Expand all
36 Reduction JSTypeFeedbackLowering::ReduceJSLoadNamed(Node* node) { 36 Reduction JSTypeFeedbackLowering::ReduceJSLoadNamed(Node* node) {
37 DCHECK_EQ(IrOpcode::kJSLoadNamed, node->opcode()); 37 DCHECK_EQ(IrOpcode::kJSLoadNamed, node->opcode());
38 Node* receiver = NodeProperties::GetValueInput(node, 0); 38 Node* receiver = NodeProperties::GetValueInput(node, 0);
39 Type* receiver_type = NodeProperties::GetType(receiver); 39 Type* receiver_type = NodeProperties::GetType(receiver);
40 Node* frame_state = NodeProperties::GetFrameStateInput(node, 1); 40 Node* frame_state = NodeProperties::GetFrameStateInput(node, 1);
41 Node* effect = NodeProperties::GetEffectInput(node); 41 Node* effect = NodeProperties::GetEffectInput(node);
42 Node* control = NodeProperties::GetControlInput(node); 42 Node* control = NodeProperties::GetControlInput(node);
43 // We need to make optimistic assumptions to continue. 43 // We need to make optimistic assumptions to continue.
44 if (!(flags() & kDeoptimizationEnabled)) return NoChange(); 44 if (!(flags() & kDeoptimizationEnabled)) return NoChange();
45 LoadNamedParameters const& p = LoadNamedParametersOf(node->op()); 45 LoadNamedParameters const& p = LoadNamedParametersOf(node->op());
46 if (p.feedback().vector().is_null()) return NoChange(); 46 if (!p.feedback().IsValid()) return NoChange(); // No feedback.
47 if (p.name().is_identical_to(factory()->length_string())) { 47 if (p.name().is_identical_to(factory()->length_string())) {
48 LoadICNexus nexus(p.feedback().vector(), p.feedback().slot()); 48 LoadICNexus nexus(p.feedback().vector(), p.feedback().slot());
49 MapHandleList maps; 49 MapHandleList maps;
50 if (nexus.ExtractMaps(&maps) > 0) { 50 if (nexus.ExtractMaps(&maps) > 0) {
51 for (Handle<Map> map : maps) { 51 for (Handle<Map> map : maps) {
52 if (map->instance_type() >= FIRST_NONSTRING_TYPE) return NoChange(); 52 if (map->instance_type() >= FIRST_NONSTRING_TYPE) return NoChange();
53 } 53 }
54 // Optimistic optimization for "length" property of strings. 54 // Optimistic optimization for "length" property of strings.
55 if (receiver_type->Maybe(Type::TaggedSigned())) { 55 if (receiver_type->Maybe(Type::TaggedSigned())) {
56 Node* check = graph()->NewNode(simplified()->ObjectIsSmi(), receiver); 56 Node* check = graph()->NewNode(simplified()->ObjectIsSmi(), receiver);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 111
112 112
113 MachineOperatorBuilder* JSTypeFeedbackLowering::machine() const { 113 MachineOperatorBuilder* JSTypeFeedbackLowering::machine() const {
114 return jsgraph()->machine(); 114 return jsgraph()->machine();
115 } 115 }
116 116
117 } // namespace compiler 117 } // namespace compiler
118 } // namespace internal 118 } // namespace internal
119 } // namespace v8 119 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-operator.h ('k') | src/compiler/node-properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698