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

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

Issue 444883006: Initial shot at deoptimizing JSCallFunction in Turbofan. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove debug print 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"
10 #include "src/compiler/opcodes.h" 11 #include "src/compiler/opcodes.h"
11 #include "src/compiler/operator-properties.h" 12 #include "src/compiler/operator-properties.h"
12 13
13 namespace v8 { 14 namespace v8 {
14 namespace internal { 15 namespace internal {
15 namespace compiler { 16 namespace compiler {
16 17
17 inline bool OperatorProperties::HasValueInput(Operator* op) { 18 inline bool OperatorProperties::HasValueInput(Operator* op) {
18 return OperatorProperties::GetValueInputCount(op) > 0; 19 return OperatorProperties::GetValueInputCount(op) > 0;
19 } 20 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 opcode == IrOpcode::kPhi; 124 opcode == IrOpcode::kPhi;
124 } 125 }
125 126
126 inline bool OperatorProperties::IsScheduleRoot(Operator* op) { 127 inline bool OperatorProperties::IsScheduleRoot(Operator* op) {
127 uint8_t opcode = op->opcode(); 128 uint8_t opcode = op->opcode();
128 return opcode == IrOpcode::kEnd || opcode == IrOpcode::kEffectPhi || 129 return opcode == IrOpcode::kEnd || opcode == IrOpcode::kEffectPhi ||
129 opcode == IrOpcode::kPhi; 130 opcode == IrOpcode::kPhi;
130 } 131 }
131 132
132 inline bool OperatorProperties::CanLazilyDeoptimize(Operator* op) { 133 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
133 if (op->opcode() == IrOpcode::kCall) { 142 if (op->opcode() == IrOpcode::kCall) {
134 CallOperator* call_op = reinterpret_cast<CallOperator*>(op); 143 CallOperator* call_op = reinterpret_cast<CallOperator*>(op);
135 CallDescriptor* descriptor = call_op->parameter(); 144 CallDescriptor* descriptor = call_op->parameter();
136 return descriptor->CanLazilyDeoptimize(); 145 return descriptor->CanLazilyDeoptimize();
137 } 146 }
138 if (op->opcode() == IrOpcode::kJSCallRuntime) { 147 if (op->opcode() == IrOpcode::kJSCallRuntime) {
139 // TODO(jarin) At the moment, we only support lazy deoptimization for 148 // TODO(jarin) At the moment, we only support lazy deoptimization for
140 // the %DeoptimizeFunction runtime function. 149 // the %DeoptimizeFunction runtime function.
141 Runtime::FunctionId function = 150 Runtime::FunctionId function =
142 reinterpret_cast<Operator1<Runtime::FunctionId>*>(op)->parameter(); 151 reinterpret_cast<Operator1<Runtime::FunctionId>*>(op)->parameter();
143 return function == Runtime::kDeoptimizeFunction; 152 return function == Runtime::kDeoptimizeFunction;
144 } 153 }
154 if (op->opcode() == IrOpcode::kJSCallFunction) {
155 CallParameters p =
156 reinterpret_cast<Operator1<CallParameters>*>(op)->parameter();
157 return p.can_deoptimize == CallDescriptor::kCanDeoptimize;
158 }
145 return false; 159 return false;
146 } 160 }
147 } 161 }
148 } 162 }
149 } // namespace v8::internal::compiler 163 } // namespace v8::internal::compiler
150 164
151 #endif // V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ 165 #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