OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/code-stubs.h" | 5 #include "src/code-stubs.h" |
6 #include "src/compiler/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
7 #include "src/compiler/graph-inl.h" | 7 #include "src/compiler/graph-inl.h" |
8 #include "src/compiler/js-generic-lowering.h" | 8 #include "src/compiler/js-generic-lowering.h" |
9 #include "src/compiler/machine-operator.h" | 9 #include "src/compiler/machine-operator.h" |
10 #include "src/compiler/node-aux-data-inl.h" | 10 #include "src/compiler/node-aux-data-inl.h" |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 } | 281 } |
282 REPLACE_UNIMPLEMENTED(JSToString) | 282 REPLACE_UNIMPLEMENTED(JSToString) |
283 REPLACE_UNIMPLEMENTED(JSToName) | 283 REPLACE_UNIMPLEMENTED(JSToName) |
284 REPLACE_UNIMPLEMENTED(JSYield) | 284 REPLACE_UNIMPLEMENTED(JSYield) |
285 REPLACE_UNIMPLEMENTED(JSDebugger) | 285 REPLACE_UNIMPLEMENTED(JSDebugger) |
286 #undef REPLACE_UNIMPLEMENTED | 286 #undef REPLACE_UNIMPLEMENTED |
287 | 287 |
288 | 288 |
289 static CallDescriptor::DeoptimizationSupport DeoptimizationSupportForNode( | 289 static CallDescriptor::DeoptimizationSupport DeoptimizationSupportForNode( |
290 Node* node) { | 290 Node* node) { |
291 return OperatorProperties::CanLazilyDeoptimize(node->op()) | 291 int result = CallDescriptor::kNoDeoptimization; |
292 ? CallDescriptor::kCanDeoptimize | 292 if (OperatorProperties::CanLazilyDeoptimize(node->op())) { |
293 : CallDescriptor::kCannotDeoptimize; | 293 result |= CallDescriptor::kLazyDeoptimization; |
| 294 } |
| 295 if (OperatorProperties::HasFrameStateInput(node->op())) { |
| 296 result |= CallDescriptor::kNeedsFrameState; |
| 297 } |
| 298 return static_cast<CallDescriptor::DeoptimizationSupport>(result); |
294 } | 299 } |
295 | 300 |
296 | 301 |
297 void JSGenericLowering::ReplaceWithCompareIC(Node* node, Token::Value token, | 302 void JSGenericLowering::ReplaceWithCompareIC(Node* node, Token::Value token, |
298 bool pure) { | 303 bool pure) { |
299 BinaryOpICStub stub(isolate(), Token::ADD); // TODO(mstarzinger): Hack. | 304 BinaryOpICStub stub(isolate(), Token::ADD); // TODO(mstarzinger): Hack. |
300 CodeStubInterfaceDescriptor* d = stub.GetInterfaceDescriptor(); | 305 CodeStubInterfaceDescriptor* d = stub.GetInterfaceDescriptor(); |
301 CallDescriptor* desc_compare = linkage()->GetStubCallDescriptor(d); | 306 CallDescriptor* desc_compare = linkage()->GetStubCallDescriptor(d); |
302 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), token); | 307 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), token); |
303 Node* compare; | 308 Node* compare; |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 | 540 |
536 Node* JSGenericLowering::LowerJSCallRuntime(Node* node) { | 541 Node* JSGenericLowering::LowerJSCallRuntime(Node* node) { |
537 Runtime::FunctionId function = OpParameter<Runtime::FunctionId>(node); | 542 Runtime::FunctionId function = OpParameter<Runtime::FunctionId>(node); |
538 int arity = OperatorProperties::GetValueInputCount(node->op()); | 543 int arity = OperatorProperties::GetValueInputCount(node->op()); |
539 ReplaceWithRuntimeCall(node, function, arity); | 544 ReplaceWithRuntimeCall(node, function, arity); |
540 return node; | 545 return node; |
541 } | 546 } |
542 } | 547 } |
543 } | 548 } |
544 } // namespace v8::internal::compiler | 549 } // namespace v8::internal::compiler |
OLD | NEW |