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

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: Comment response. Created 6 years, 10 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
Index: src/type-info.cc
diff --git a/src/type-info.cc b/src/type-info.cc
index 695b9dd78740ffde654193aac0068e848b508400..4b10f7213c936749945c06887f41d1241680d950 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -152,31 +152,17 @@ KeyedAccessStoreMode TypeFeedbackOracle::GetStoreMode(
Handle<JSFunction> TypeFeedbackOracle::GetCallTarget(int slot) {
- Handle<Object> info = GetInfo(slot);
- if (info->IsAllocationSite()) {
- return Handle<JSFunction>(isolate()->global_context()->array_function());
- } else {
- return Handle<JSFunction>::cast(info);
- }
+ return Handle<JSFunction>::cast(GetInfo(slot));
}
Handle<JSFunction> TypeFeedbackOracle::GetCallNewTarget(int slot) {
- Handle<Object> info = GetInfo(slot);
- if (info->IsAllocationSite()) {
- return Handle<JSFunction>(isolate()->global_context()->array_function());
- } else {
- return Handle<JSFunction>::cast(info);
- }
+ return Handle<JSFunction>::cast(GetInfo(slot));
}
Handle<AllocationSite> TypeFeedbackOracle::GetCallNewAllocationSite(int slot) {
- Handle<Object> info = GetInfo(slot);
- if (info->IsAllocationSite()) {
- return Handle<AllocationSite>::cast(info);
- }
- return Handle<AllocationSite>::null();
+ return Handle<AllocationSite>::cast(GetInfo(slot));
}

Powered by Google App Engine
This is Rietveld 408576698