| Index: src/type-info.cc
|
| diff --git a/src/type-info.cc b/src/type-info.cc
|
| index e2be3aa66db4c0a7089bc5a072be9446fc59107a..532103b2b251c315dba08733c7c8fcec9e55142e 100644
|
| --- a/src/type-info.cc
|
| +++ b/src/type-info.cc
|
| @@ -186,13 +186,14 @@ bool TypeFeedbackOracle::StoreIsPolymorphic(TypeFeedbackId ast_id) {
|
|
|
| bool TypeFeedbackOracle::CallIsMonomorphic(Call* expr) {
|
| Handle<Object> value = GetInfo(expr->CallFeedbackId());
|
| - return value->IsMap() || value->IsSmi() || value->IsJSFunction();
|
| + return value->IsMap() || value->IsAllocationSite() || value->IsJSFunction() ||
|
| + value->IsSmi();
|
| }
|
|
|
|
|
| bool TypeFeedbackOracle::CallNewIsMonomorphic(CallNew* expr) {
|
| Handle<Object> info = GetInfo(expr->CallNewFeedbackId());
|
| - return info->IsSmi() || info->IsJSFunction();
|
| + return info->IsAllocationSite() || info->IsJSFunction();
|
| }
|
|
|
|
|
| @@ -302,9 +303,7 @@ CheckType TypeFeedbackOracle::GetCallCheckType(Call* expr) {
|
|
|
| Handle<JSFunction> TypeFeedbackOracle::GetCallTarget(Call* expr) {
|
| Handle<Object> info = GetInfo(expr->CallFeedbackId());
|
| - if (info->IsSmi()) {
|
| - ASSERT(static_cast<ElementsKind>(Smi::cast(*info)->value()) <=
|
| - LAST_FAST_ELEMENTS_KIND);
|
| + if (info->IsAllocationSite()) {
|
| return Handle<JSFunction>(isolate_->global_context()->array_function());
|
| } else {
|
| return Handle<JSFunction>::cast(info);
|
| @@ -314,9 +313,7 @@ Handle<JSFunction> TypeFeedbackOracle::GetCallTarget(Call* expr) {
|
|
|
| Handle<JSFunction> TypeFeedbackOracle::GetCallNewTarget(CallNew* expr) {
|
| Handle<Object> info = GetInfo(expr->CallNewFeedbackId());
|
| - if (info->IsSmi()) {
|
| - ASSERT(static_cast<ElementsKind>(Smi::cast(*info)->value()) <=
|
| - LAST_FAST_ELEMENTS_KIND);
|
| + if (info->IsAllocationSite()) {
|
| return Handle<JSFunction>(isolate_->global_context()->array_function());
|
| } else {
|
| return Handle<JSFunction>::cast(info);
|
| @@ -675,6 +672,7 @@ void TypeFeedbackOracle::ProcessTypeFeedbackCells(Handle<Code> code) {
|
| Cell* cell = cache->GetCell(i);
|
| Object* value = cell->value();
|
| if (value->IsSmi() ||
|
| + value->IsAllocationSite() ||
|
| (value->IsJSFunction() &&
|
| !CanRetainOtherContext(JSFunction::cast(value),
|
| *native_context_))) {
|
|
|