Index: src/compiler/js-call-reducer.cc |
diff --git a/src/compiler/js-call-reducer.cc b/src/compiler/js-call-reducer.cc |
index cfee70a6df3ae041a8049088c072694f30776409..dcce497447cc504c1dc7d7803dd3528da9fcf53e 100644 |
--- a/src/compiler/js-call-reducer.cc |
+++ b/src/compiler/js-call-reducer.cc |
@@ -14,30 +14,6 @@ namespace v8 { |
namespace internal { |
namespace compiler { |
-namespace { |
- |
-VectorSlotPair CallCountFeedback(VectorSlotPair p) { |
- // Extract call count from {p}. |
- if (!p.IsValid()) return VectorSlotPair(); |
- CallICNexus n(p.vector(), p.slot()); |
- int const call_count = n.ExtractCallCount(); |
- if (call_count <= 0) return VectorSlotPair(); |
- |
- // Create megamorphic CallIC feedback with the given {call_count}. |
- StaticFeedbackVectorSpec spec; |
- FeedbackVectorSlot slot = spec.AddCallICSlot(); |
- Handle<TypeFeedbackMetadata> metadata = |
- TypeFeedbackMetadata::New(n.GetIsolate(), &spec); |
- Handle<TypeFeedbackVector> vector = |
- TypeFeedbackVector::New(n.GetIsolate(), metadata); |
- CallICNexus nexus(vector, slot); |
- nexus.ConfigureMegamorphic(call_count); |
- return VectorSlotPair(vector, slot); |
-} |
- |
-} // namespace |
- |
- |
Reduction JSCallReducer::Reduce(Node* node) { |
switch (node->opcode()) { |
case IrOpcode::kJSCallConstruct: |
@@ -166,7 +142,7 @@ Reduction JSCallReducer::ReduceFunctionPrototypeApply(Node* node) { |
} |
// Change {node} to the new {JSCallFunction} operator. |
NodeProperties::ChangeOp( |
- node, javascript()->CallFunction(arity, CallCountFeedback(p.feedback()), |
+ node, javascript()->CallFunction(arity, p.frequency(), VectorSlotPair(), |
convert_mode, p.tail_call_mode())); |
// Change context of {node} to the Function.prototype.apply context, |
// to ensure any exception is thrown in the correct context. |
@@ -206,7 +182,7 @@ Reduction JSCallReducer::ReduceFunctionPrototypeCall(Node* node) { |
--arity; |
} |
NodeProperties::ChangeOp( |
- node, javascript()->CallFunction(arity, CallCountFeedback(p.feedback()), |
+ node, javascript()->CallFunction(arity, p.frequency(), VectorSlotPair(), |
convert_mode, p.tail_call_mode())); |
// Try to further reduce the JSCallFunction {node}. |
Reduction const reduction = ReduceJSCallFunction(node); |
@@ -287,7 +263,7 @@ Reduction JSCallReducer::ReduceJSCallFunction(Node* node) { |
arity++; |
} |
NodeProperties::ChangeOp(node, javascript()->CallFunction( |
- arity, CallCountFeedback(p.feedback()), |
+ arity, p.frequency(), VectorSlotPair(), |
convert_mode, p.tail_call_mode())); |
// Try to further reduce the JSCallFunction {node}. |
Reduction const reduction = ReduceJSCallFunction(node); |