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

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

Issue 1314473007: [turbofan] Remove usage of Unique<T> from graph. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased and fixed. Created 5 years, 3 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-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 10
(...skipping 25 matching lines...) Expand all
36 Node* receiver = NodeProperties::GetValueInput(node, 0); 36 Node* receiver = NodeProperties::GetValueInput(node, 0);
37 Type* receiver_type = NodeProperties::GetBounds(receiver).upper; 37 Type* receiver_type = NodeProperties::GetBounds(receiver).upper;
38 Node* frame_state = NodeProperties::GetFrameStateInput(node, 1); 38 Node* frame_state = NodeProperties::GetFrameStateInput(node, 1);
39 Node* effect = NodeProperties::GetEffectInput(node); 39 Node* effect = NodeProperties::GetEffectInput(node);
40 Node* control = NodeProperties::GetControlInput(node); 40 Node* control = NodeProperties::GetControlInput(node);
41 // We need to make optimistic assumptions to continue. 41 // We need to make optimistic assumptions to continue.
42 if (!(flags() & kDeoptimizationEnabled)) return NoChange(); 42 if (!(flags() & kDeoptimizationEnabled)) return NoChange();
43 LoadNamedParameters const& p = LoadNamedParametersOf(node->op()); 43 LoadNamedParameters const& p = LoadNamedParametersOf(node->op());
44 Handle<TypeFeedbackVector> vector; 44 Handle<TypeFeedbackVector> vector;
45 if (!p.feedback().vector().ToHandle(&vector)) return NoChange(); 45 if (!p.feedback().vector().ToHandle(&vector)) return NoChange();
46 if (p.name().handle().is_identical_to(factory()->length_string())) { 46 if (p.name().is_identical_to(factory()->length_string())) {
47 LoadICNexus nexus(vector, p.feedback().slot()); 47 LoadICNexus nexus(vector, p.feedback().slot());
48 MapHandleList maps; 48 MapHandleList maps;
49 if (nexus.ExtractMaps(&maps) > 0) { 49 if (nexus.ExtractMaps(&maps) > 0) {
50 for (Handle<Map> map : maps) { 50 for (Handle<Map> map : maps) {
51 if (map->instance_type() >= FIRST_NONSTRING_TYPE) return NoChange(); 51 if (map->instance_type() >= FIRST_NONSTRING_TYPE) return NoChange();
52 } 52 }
53 // Optimistic optimization for "length" property of strings. 53 // Optimistic optimization for "length" property of strings.
54 if (receiver_type->Maybe(Type::TaggedSigned())) { 54 if (receiver_type->Maybe(Type::TaggedSigned())) {
55 Node* check = graph()->NewNode(simplified()->ObjectIsSmi(), receiver); 55 Node* check = graph()->NewNode(simplified()->ObjectIsSmi(), receiver);
56 Node* branch = graph()->NewNode(common()->Branch(BranchHint::kFalse), 56 Node* branch = graph()->NewNode(common()->Branch(BranchHint::kFalse),
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 110
111 111
112 MachineOperatorBuilder* JSTypeFeedbackLowering::machine() const { 112 MachineOperatorBuilder* JSTypeFeedbackLowering::machine() const {
113 return jsgraph()->machine(); 113 return jsgraph()->machine();
114 } 114 }
115 115
116 } // namespace compiler 116 } // namespace compiler
117 } // namespace internal 117 } // namespace internal
118 } // namespace v8 118 } // 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