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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 result |= CallDescriptor::kNeedsFrameState; | 115 result |= CallDescriptor::kNeedsFrameState; |
116 } | 116 } |
117 return result; | 117 return result; |
118 } | 118 } |
119 | 119 |
120 | 120 |
121 void JSGenericLowering::ReplaceWithCompareIC(Node* node, Token::Value token) { | 121 void JSGenericLowering::ReplaceWithCompareIC(Node* node, Token::Value token) { |
122 Callable callable = CodeFactory::CompareIC(isolate(), token); | 122 Callable callable = CodeFactory::CompareIC(isolate(), token); |
123 CallDescriptor* desc_compare = Linkage::GetStubCallDescriptor( | 123 CallDescriptor* desc_compare = Linkage::GetStubCallDescriptor( |
124 isolate(), zone(), callable.descriptor(), 0, | 124 isolate(), zone(), callable.descriptor(), 0, |
125 CallDescriptor::kPatchableCallSiteWithNop | FlagsForNode(node)); | 125 CallDescriptor::kPatchableCallSiteWithNop | FlagsForNode(node), |
| 126 Operator::kNoProperties, kMachInt32); |
126 | 127 |
127 // Create a new call node asking a CompareIC for help. | 128 // Create a new call node asking a CompareIC for help. |
128 NodeVector inputs(zone()); | 129 NodeVector inputs(zone()); |
129 inputs.reserve(node->InputCount() + 1); | 130 inputs.reserve(node->InputCount() + 1); |
130 inputs.push_back(jsgraph()->HeapConstant(callable.code())); | 131 inputs.push_back(jsgraph()->HeapConstant(callable.code())); |
131 inputs.push_back(NodeProperties::GetValueInput(node, 0)); | 132 inputs.push_back(NodeProperties::GetValueInput(node, 0)); |
132 inputs.push_back(NodeProperties::GetValueInput(node, 1)); | 133 inputs.push_back(NodeProperties::GetValueInput(node, 1)); |
133 inputs.push_back(NodeProperties::GetContextInput(node)); | 134 inputs.push_back(NodeProperties::GetContextInput(node)); |
134 if (node->op()->HasProperty(Operator::kPure)) { | 135 if (node->op()->HasProperty(Operator::kPure)) { |
135 // A pure (strict) comparison doesn't have an effect, control or frame | 136 // A pure (strict) comparison doesn't have an effect, control or frame |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 } | 548 } |
548 | 549 |
549 | 550 |
550 MachineOperatorBuilder* JSGenericLowering::machine() const { | 551 MachineOperatorBuilder* JSGenericLowering::machine() const { |
551 return jsgraph()->machine(); | 552 return jsgraph()->machine(); |
552 } | 553 } |
553 | 554 |
554 } // namespace compiler | 555 } // namespace compiler |
555 } // namespace internal | 556 } // namespace internal |
556 } // namespace v8 | 557 } // namespace v8 |
OLD | NEW |