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-factory.h" | 5 #include "src/code-factory.h" |
6 #include "src/code-stubs.h" | 6 #include "src/code-stubs.h" |
7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
8 #include "src/compiler/js-generic-lowering.h" | 8 #include "src/compiler/js-generic-lowering.h" |
9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 static CallDescriptor::Flags FlagsForNode(Node* node) { | 109 static CallDescriptor::Flags FlagsForNode(Node* node) { |
110 CallDescriptor::Flags result = CallDescriptor::kNoFlags; | 110 CallDescriptor::Flags result = CallDescriptor::kNoFlags; |
111 if (OperatorProperties::GetFrameStateInputCount(node->op()) > 0) { | 111 if (OperatorProperties::GetFrameStateInputCount(node->op()) > 0) { |
112 result |= CallDescriptor::kNeedsFrameState; | 112 result |= CallDescriptor::kNeedsFrameState; |
113 } | 113 } |
114 return result; | 114 return result; |
115 } | 115 } |
116 | 116 |
117 | 117 |
118 void JSGenericLowering::ReplaceWithCompareIC(Node* node, Token::Value token) { | 118 void JSGenericLowering::ReplaceWithCompareIC(Node* node, Token::Value token) { |
119 Callable callable = CodeFactory::CompareIC(isolate(), token); | 119 Callable callable = |
| 120 CodeFactory::CompareIC(isolate(), token, OpParameter<LanguageMode>(node)); |
120 CallDescriptor* desc_compare = Linkage::GetStubCallDescriptor( | 121 CallDescriptor* desc_compare = Linkage::GetStubCallDescriptor( |
121 isolate(), zone(), callable.descriptor(), 0, | 122 isolate(), zone(), callable.descriptor(), 0, |
122 CallDescriptor::kPatchableCallSiteWithNop | FlagsForNode(node), | 123 CallDescriptor::kPatchableCallSiteWithNop | FlagsForNode(node), |
123 Operator::kNoProperties, kMachIntPtr); | 124 Operator::kNoProperties, kMachIntPtr); |
124 | 125 |
125 // Create a new call node asking a CompareIC for help. | 126 // Create a new call node asking a CompareIC for help. |
126 NodeVector inputs(zone()); | 127 NodeVector inputs(zone()); |
127 inputs.reserve(node->InputCount() + 1); | 128 inputs.reserve(node->InputCount() + 1); |
128 inputs.push_back(jsgraph()->HeapConstant(callable.code())); | 129 inputs.push_back(jsgraph()->HeapConstant(callable.code())); |
129 inputs.push_back(NodeProperties::GetValueInput(node, 0)); | 130 inputs.push_back(NodeProperties::GetValueInput(node, 0)); |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 } | 576 } |
576 | 577 |
577 | 578 |
578 MachineOperatorBuilder* JSGenericLowering::machine() const { | 579 MachineOperatorBuilder* JSGenericLowering::machine() const { |
579 return jsgraph()->machine(); | 580 return jsgraph()->machine(); |
580 } | 581 } |
581 | 582 |
582 } // namespace compiler | 583 } // namespace compiler |
583 } // namespace internal | 584 } // namespace internal |
584 } // namespace v8 | 585 } // namespace v8 |
OLD | NEW |