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

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

Issue 2020323004: [turbofan] Remove eager frame state from all nodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_turbofan-checkpoint-3
Patch Set: Rebased. 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-create-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-call-reducer.h" 5 #include "src/compiler/js-call-reducer.h"
6 6
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/simplified-operator.h" 9 #include "src/compiler/simplified-operator.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 for (Edge edge : arg_array->use_edges()) { 122 for (Edge edge : arg_array->use_edges()) {
123 if (edge.from()->opcode() == IrOpcode::kStateValues) continue; 123 if (edge.from()->opcode() == IrOpcode::kStateValues) continue;
124 if (!NodeProperties::IsValueEdge(edge)) continue; 124 if (!NodeProperties::IsValueEdge(edge)) continue;
125 if (edge.from() == node) continue; 125 if (edge.from() == node) continue;
126 return NoChange(); 126 return NoChange();
127 } 127 }
128 // Get to the actual frame state from which to extract the arguments; 128 // Get to the actual frame state from which to extract the arguments;
129 // we can only optimize this in case the {node} was already inlined into 129 // we can only optimize this in case the {node} was already inlined into
130 // some other function (and same for the {arg_array}). 130 // some other function (and same for the {arg_array}).
131 CreateArgumentsType type = CreateArgumentsTypeOf(arg_array->op()); 131 CreateArgumentsType type = CreateArgumentsTypeOf(arg_array->op());
132 Node* frame_state = NodeProperties::GetFrameStateInput(arg_array, 0); 132 Node* frame_state = NodeProperties::GetFrameStateInput(arg_array);
133 Node* outer_state = frame_state->InputAt(kFrameStateOuterStateInput); 133 Node* outer_state = frame_state->InputAt(kFrameStateOuterStateInput);
134 if (outer_state->opcode() != IrOpcode::kFrameState) return NoChange(); 134 if (outer_state->opcode() != IrOpcode::kFrameState) return NoChange();
135 FrameStateInfo outer_info = OpParameter<FrameStateInfo>(outer_state); 135 FrameStateInfo outer_info = OpParameter<FrameStateInfo>(outer_state);
136 if (outer_info.type() == FrameStateType::kArgumentsAdaptor) { 136 if (outer_info.type() == FrameStateType::kArgumentsAdaptor) {
137 // Need to take the parameters from the arguments adaptor. 137 // Need to take the parameters from the arguments adaptor.
138 frame_state = outer_state; 138 frame_state = outer_state;
139 } 139 }
140 FrameStateInfo state_info = OpParameter<FrameStateInfo>(frame_state); 140 FrameStateInfo state_info = OpParameter<FrameStateInfo>(frame_state);
141 int start_index = 0; 141 int start_index = 0;
142 if (type == CreateArgumentsType::kMappedArguments) { 142 if (type == CreateArgumentsType::kMappedArguments) {
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 return jsgraph()->javascript(); 503 return jsgraph()->javascript();
504 } 504 }
505 505
506 SimplifiedOperatorBuilder* JSCallReducer::simplified() const { 506 SimplifiedOperatorBuilder* JSCallReducer::simplified() const {
507 return jsgraph()->simplified(); 507 return jsgraph()->simplified();
508 } 508 }
509 509
510 } // namespace compiler 510 } // namespace compiler
511 } // namespace internal 511 } // namespace internal
512 } // namespace v8 512 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/js-create-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698