| Index: src/interpreter/bytecode-generator.cc
|
| diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
|
| index fc5a4a4fa67c5a470aefee9b7dfe4b2d7600301e..c67e5d43f706b797a63f5fe9b77257d0fefefe69 100644
|
| --- a/src/interpreter/bytecode-generator.cc
|
| +++ b/src/interpreter/bytecode-generator.cc
|
| @@ -2501,13 +2501,14 @@ void BytecodeGenerator::VisitCallSuper(Call* expr) {
|
|
|
| // Call construct.
|
| builder()->SetExpressionPosition(expr);
|
| - // Valid type feedback slots can only be greater than kReservedIndexCount.
|
| - // Assert that 0 cannot be valid a valid slot id.
|
| - STATIC_ASSERT(TypeFeedbackVector::kReservedIndexCount > 0);
|
| - // Type feedback is not necessary for super constructor calls. The type
|
| - // information can be inferred in most cases. Slot id 0 indicates type
|
| - // feedback is not required.
|
| - builder()->New(constructor, args, 0);
|
| + // TODO(turbofan): For now we do gather feedback on super constructor
|
| + // calls, utilizing the existing machinery to inline the actual call
|
| + // target and the JSCreate for the implicit receiver allocation. This
|
| + // is not an ideal solution for super constructor calls, but it gets
|
| + // the job done for now. In the long run we might want to revisit this
|
| + // and come up with a better way.
|
| + int const feedback_slot_index = feedback_index(expr->CallFeedbackICSlot());
|
| + builder()->New(constructor, args, feedback_slot_index);
|
| }
|
|
|
| void BytecodeGenerator::VisitCallNew(CallNew* expr) {
|
|
|