| Index: src/typing.cc
|
| diff --git a/src/typing.cc b/src/typing.cc
|
| index 596ea2c612ca0cbe4daeee72f5e41d9e6f9cfe7a..f3d6d75727d188c49cb7144d1b3b0217f0f0e725 100644
|
| --- a/src/typing.cc
|
| +++ b/src/typing.cc
|
| @@ -42,7 +42,8 @@ AstTyper::AstTyper(CompilationInfo* info)
|
| Handle<Code>(info->closure()->shared()->code()),
|
| Handle<Context>(info->closure()->context()->native_context()),
|
| info->zone()),
|
| - store_(info->zone()) {
|
| + store_(info->zone()),
|
| + current_feedback_slot_(0) {
|
| InitializeAstVisitor(info->zone());
|
| }
|
|
|
| @@ -322,8 +323,9 @@ void AstTyper::VisitForStatement(ForStatement* stmt) {
|
|
|
| void AstTyper::VisitForInStatement(ForInStatement* stmt) {
|
| // Collect type feedback.
|
| + InitializeFeedbackSlots(stmt);
|
| stmt->set_for_in_type(static_cast<ForInStatement::ForInType>(
|
| - oracle()->ForInType(stmt->ForInFeedbackId())));
|
| + oracle()->ForInType(stmt->ForInFeedbackSlot())));
|
|
|
| RECURSE(Visit(stmt->enumerable()));
|
| store_.Forget(); // Control may transfer here via looping or 'continue'.
|
| @@ -531,6 +533,8 @@ void AstTyper::VisitProperty(Property* expr) {
|
|
|
|
|
| void AstTyper::VisitCall(Call* expr) {
|
| + InitializeFeedbackSlots(expr);
|
| +
|
| // Collect type feedback.
|
| expr->RecordTypeFeedback(oracle());
|
|
|
| @@ -550,7 +554,15 @@ void AstTyper::VisitCall(Call* expr) {
|
| }
|
|
|
|
|
| +void AstTyper::InitializeFeedbackSlots(AstNode* expr) {
|
| + current_feedback_slot_ = expr->ConsumeFeedbackSlots(
|
| + isolate(), current_feedback_slot_);
|
| +}
|
| +
|
| +
|
| void AstTyper::VisitCallNew(CallNew* expr) {
|
| + InitializeFeedbackSlots(expr);
|
| +
|
| // Collect type feedback.
|
| expr->RecordTypeFeedback(oracle());
|
|
|
|
|