Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: src/type-info.cc

Issue 300693002: Revert "Customized support for feedback on calls to Array." and follow-up fixes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/type-info.h ('k') | src/typing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-info.cc
diff --git a/src/type-info.cc b/src/type-info.cc
index ca3baa1215ff29afba9e3a11b7c628c3040e4b22..83fcd0f25e79f030a6593b5984ab1ea25235806e 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -97,7 +97,9 @@ bool TypeFeedbackOracle::StoreIsKeyedPolymorphic(TypeFeedbackId ast_id) {
bool TypeFeedbackOracle::CallIsMonomorphic(int slot) {
Handle<Object> value = GetInfo(slot);
- return value->IsAllocationSite() || value->IsJSFunction();
+ return FLAG_pretenuring_call_new
+ ? value->IsJSFunction()
+ : value->IsAllocationSite() || value->IsJSFunction();
}
@@ -132,10 +134,7 @@ KeyedAccessStoreMode TypeFeedbackOracle::GetStoreMode(
Handle<JSFunction> TypeFeedbackOracle::GetCallTarget(int slot) {
Handle<Object> info = GetInfo(slot);
- if (info->IsAllocationSite()) {
- ASSERT(!FLAG_pretenuring_call_new);
- return Handle<JSFunction>(isolate()->native_context()->array_function());
- } else {
+ if (FLAG_pretenuring_call_new || info->IsJSFunction()) {
return Handle<JSFunction>::cast(info);
}
@@ -155,15 +154,6 @@ 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()) {
« no previous file with comments | « src/type-info.h ('k') | src/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698