Index: src/interpreter/bytecode-generator.cc |
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
index d7445c5d5cadaa21ec76b843d383a692f65a7511..baf58d86b69b2d88a30221854e018b3cfaed8a4e 100644 |
--- a/src/interpreter/bytecode-generator.cc |
+++ b/src/interpreter/bytecode-generator.cc |
@@ -2530,7 +2530,7 @@ void BytecodeGenerator::VisitCall(Call* expr) { |
if (expr->CallFeedbackICSlot().IsInvalid()) { |
DCHECK(call_type == Call::POSSIBLY_EVAL_CALL); |
// Valid type feedback slots can only be greater than kReservedIndexCount. |
- // We use 0 to indicate an invalid slot it. Statically assert that 0 cannot |
+ // We use 0 to indicate an invalid slot id. Statically assert that 0 cannot |
// be a valid slot id. |
STATIC_ASSERT(TypeFeedbackVector::kReservedIndexCount > 0); |
feedback_slot_index = 0; |
@@ -2565,7 +2565,13 @@ void BytecodeGenerator::VisitCallSuper(Call* expr) { |
// Call construct. |
builder()->SetExpressionPosition(expr); |
- builder()->New(constructor, first_arg, args->length()); |
+ // 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, first_arg, args->length(), 0); |
execution_result()->SetResultInAccumulator(); |
} |
@@ -2582,7 +2588,8 @@ void BytecodeGenerator::VisitCallNew(CallNew* expr) { |
// constructor for CallNew. |
builder() |
->LoadAccumulatorWithRegister(constructor) |
- .New(constructor, first_arg, args->length()); |
+ .New(constructor, first_arg, args->length(), |
+ feedback_index(expr->CallNewFeedbackSlot())); |
execution_result()->SetResultInAccumulator(); |
} |