| Index: src/ast.cc
|
| diff --git a/src/ast.cc b/src/ast.cc
|
| index 6a92b8429847a9e670371f13d2cd337ae1b47ac3..b43e10f107eb4420f9f2f0e82118249d25432c11 100644
|
| --- a/src/ast.cc
|
| +++ b/src/ast.cc
|
| @@ -645,10 +645,19 @@ void Call::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
|
| }
|
| }
|
| #endif
|
| - if (receiver_types_ != NULL && receiver_types_->length() > 0) {
|
| - Handle<Map> type = receiver_types_->at(0);
|
| - is_monomorphic_ = oracle->CallIsMonomorphic(this);
|
| - if (is_monomorphic_) is_monomorphic_ = ComputeTarget(type, name);
|
| + is_monomorphic_ = oracle->CallIsMonomorphic(this);
|
| + check_type_ = oracle->GetCallCheckType(this);
|
| + if (is_monomorphic_) {
|
| + Handle<Map> map;
|
| + if (receiver_types_ != NULL && receiver_types_->length() > 0) {
|
| + ASSERT(check_type_ == RECEIVER_MAP_CHECK);
|
| + map = receiver_types_->at(0);
|
| + } else {
|
| + ASSERT(check_type_ != RECEIVER_MAP_CHECK);
|
| + map = Handle<Map>(
|
| + oracle->GetPrototypeForPrimitiveCheck(check_type_)->map());
|
| + }
|
| + is_monomorphic_ = ComputeTarget(map, name);
|
| }
|
| }
|
|
|
|
|