Chromium Code Reviews| Index: src/type-info.cc |
| diff --git a/src/type-info.cc b/src/type-info.cc |
| index 83fcd0f25e79f030a6593b5984ab1ea25235806e..ca3baa1215ff29afba9e3a11b7c628c3040e4b22 100644 |
| --- a/src/type-info.cc |
| +++ b/src/type-info.cc |
| @@ -97,9 +97,7 @@ bool TypeFeedbackOracle::StoreIsKeyedPolymorphic(TypeFeedbackId ast_id) { |
| bool TypeFeedbackOracle::CallIsMonomorphic(int slot) { |
| Handle<Object> value = GetInfo(slot); |
| - return FLAG_pretenuring_call_new |
| - ? value->IsJSFunction() |
| - : value->IsAllocationSite() || value->IsJSFunction(); |
| + return value->IsAllocationSite() || value->IsJSFunction(); |
| } |
| @@ -134,7 +132,10 @@ KeyedAccessStoreMode TypeFeedbackOracle::GetStoreMode( |
| Handle<JSFunction> TypeFeedbackOracle::GetCallTarget(int slot) { |
| Handle<Object> info = GetInfo(slot); |
| - if (FLAG_pretenuring_call_new || info->IsJSFunction()) { |
| + if (info->IsAllocationSite()) { |
| + ASSERT(!FLAG_pretenuring_call_new); |
| + return Handle<JSFunction>(isolate()->native_context()->array_function()); |
|
danno
2014/05/16 16:34:11
From our conversation: Don't clear the function th
mvstanton
2014/05/19 13:45:24
Okay, I've put that over in ClearFunctionTypeFeedb
|
| + } else { |
| return Handle<JSFunction>::cast(info); |
| } |
| @@ -154,6 +155,15 @@ Handle<JSFunction> TypeFeedbackOracle::GetCallNewTarget(int slot) { |
| } |
| +Handle<AllocationSite> TypeFeedbackOracle::GetCallAllocationSite(int slot) { |
| + Handle<Object> info = GetInfo(slot); |
| + if (info->IsAllocationSite()) { |
| + return Handle<AllocationSite>::cast(info); |
| + } |
| + return Handle<AllocationSite>::null(); |
| +} |
| + |
| + |
| Handle<AllocationSite> TypeFeedbackOracle::GetCallNewAllocationSite(int slot) { |
| Handle<Object> info = GetInfo(slot); |
| if (FLAG_pretenuring_call_new || info->IsAllocationSite()) { |