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

Side by Side Diff: src/compiler/operator-properties-inl.h

Issue 453363003: Revert "Initial shot at deoptimizing JSCallFunction in Turbofan." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/linkage-impl.h ('k') | src/compiler/register-allocator.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #ifndef V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ 5 #ifndef V8_COMPILER_OPERATOR_PROPERTIES_INL_H_
6 #define V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ 6 #define V8_COMPILER_OPERATOR_PROPERTIES_INL_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/compiler/js-operator.h"
11 #include "src/compiler/opcodes.h" 10 #include "src/compiler/opcodes.h"
12 #include "src/compiler/operator-properties.h" 11 #include "src/compiler/operator-properties.h"
13 12
14 namespace v8 { 13 namespace v8 {
15 namespace internal { 14 namespace internal {
16 namespace compiler { 15 namespace compiler {
17 16
18 inline bool OperatorProperties::HasValueInput(Operator* op) { 17 inline bool OperatorProperties::HasValueInput(Operator* op) {
19 return OperatorProperties::GetValueInputCount(op) > 0; 18 return OperatorProperties::GetValueInputCount(op) > 0;
20 } 19 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 opcode == IrOpcode::kPhi; 123 opcode == IrOpcode::kPhi;
125 } 124 }
126 125
127 inline bool OperatorProperties::IsScheduleRoot(Operator* op) { 126 inline bool OperatorProperties::IsScheduleRoot(Operator* op) {
128 uint8_t opcode = op->opcode(); 127 uint8_t opcode = op->opcode();
129 return opcode == IrOpcode::kEnd || opcode == IrOpcode::kEffectPhi || 128 return opcode == IrOpcode::kEnd || opcode == IrOpcode::kEffectPhi ||
130 opcode == IrOpcode::kPhi; 129 opcode == IrOpcode::kPhi;
131 } 130 }
132 131
133 inline bool OperatorProperties::CanLazilyDeoptimize(Operator* op) { 132 inline bool OperatorProperties::CanLazilyDeoptimize(Operator* op) {
134 // TODO(jarin) This function allows turning on lazy deoptimization
135 // incrementally. It will change as we turn on lazy deopt for
136 // more nodes.
137
138 if (!FLAG_turbo_deoptimization) {
139 return false;
140 }
141
142 if (op->opcode() == IrOpcode::kCall) { 133 if (op->opcode() == IrOpcode::kCall) {
143 CallOperator* call_op = reinterpret_cast<CallOperator*>(op); 134 CallOperator* call_op = reinterpret_cast<CallOperator*>(op);
144 CallDescriptor* descriptor = call_op->parameter(); 135 CallDescriptor* descriptor = call_op->parameter();
145 return descriptor->CanLazilyDeoptimize(); 136 return descriptor->CanLazilyDeoptimize();
146 } 137 }
147 if (op->opcode() == IrOpcode::kJSCallRuntime) { 138 if (op->opcode() == IrOpcode::kJSCallRuntime) {
148 // TODO(jarin) At the moment, we only support lazy deoptimization for 139 // TODO(jarin) At the moment, we only support lazy deoptimization for
149 // the %DeoptimizeFunction runtime function. 140 // the %DeoptimizeFunction runtime function.
150 Runtime::FunctionId function = 141 Runtime::FunctionId function =
151 reinterpret_cast<Operator1<Runtime::FunctionId>*>(op)->parameter(); 142 reinterpret_cast<Operator1<Runtime::FunctionId>*>(op)->parameter();
152 return function == Runtime::kDeoptimizeFunction; 143 return function == Runtime::kDeoptimizeFunction;
153 } 144 }
154 if (op->opcode() == IrOpcode::kJSCallFunction) {
155 CallParameters p =
156 reinterpret_cast<Operator1<CallParameters>*>(op)->parameter();
157 return p.can_deoptimize == CallDescriptor::kCanDeoptimize;
158 }
159 return false; 145 return false;
160 } 146 }
161 } 147 }
162 } 148 }
163 } // namespace v8::internal::compiler 149 } // namespace v8::internal::compiler
164 150
165 #endif // V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ 151 #endif // V8_COMPILER_OPERATOR_PROPERTIES_INL_H_
OLDNEW
« no previous file with comments | « src/compiler/linkage-impl.h ('k') | src/compiler/register-allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698