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

Unified Diff: src/type-info.cc

Issue 132963012: Pretenure call new support. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 years, 9 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/runtime.cc ('k') | src/x64/builtins-x64.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 35beb1808a6a8d4319237d3a31f66aa034b03466..99b1b3d899ecf4cf9e46f893356b8192ca8a7b7b 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -120,13 +120,17 @@ 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();
}
bool TypeFeedbackOracle::CallNewIsMonomorphic(int slot) {
Handle<Object> info = GetInfo(slot);
- return info->IsAllocationSite() || info->IsJSFunction();
+ return FLAG_pretenuring_call_new
+ ? info->IsJSFunction()
+ : info->IsAllocationSite() || info->IsJSFunction();
}
@@ -153,27 +157,29 @@ KeyedAccessStoreMode TypeFeedbackOracle::GetStoreMode(
Handle<JSFunction> TypeFeedbackOracle::GetCallTarget(int slot) {
Handle<Object> info = GetInfo(slot);
- if (info->IsAllocationSite()) {
- return Handle<JSFunction>(isolate()->native_context()->array_function());
- } else {
+ if (FLAG_pretenuring_call_new || info->IsJSFunction()) {
return Handle<JSFunction>::cast(info);
}
+
+ ASSERT(info->IsAllocationSite());
+ return Handle<JSFunction>(isolate()->native_context()->array_function());
}
Handle<JSFunction> TypeFeedbackOracle::GetCallNewTarget(int slot) {
Handle<Object> info = GetInfo(slot);
- if (info->IsAllocationSite()) {
- return Handle<JSFunction>(isolate()->native_context()->array_function());
- } else {
+ if (FLAG_pretenuring_call_new || info->IsJSFunction()) {
return Handle<JSFunction>::cast(info);
}
+
+ ASSERT(info->IsAllocationSite());
+ return Handle<JSFunction>(isolate()->native_context()->array_function());
}
Handle<AllocationSite> TypeFeedbackOracle::GetCallNewAllocationSite(int slot) {
Handle<Object> info = GetInfo(slot);
- if (info->IsAllocationSite()) {
+ if (FLAG_pretenuring_call_new || info->IsAllocationSite()) {
return Handle<AllocationSite>::cast(info);
}
return Handle<AllocationSite>::null();
« no previous file with comments | « src/runtime.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698