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

Unified Diff: src/type-info.cc

Issue 106453003: Allocation site support for monomorphic StringAdds in BinaryOps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Michael's comments. Created 7 years 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
« src/hydrogen.cc ('K') | « 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 6e3a4f6b7a483bda6ebb38f08a62e59703060592..405d57666a2de37021b8c7961d4bd5945596dd97 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -408,6 +408,7 @@ void TypeFeedbackOracle::BinaryType(TypeFeedbackId id,
Handle<Type>* right,
Handle<Type>* result,
Maybe<int>* fixed_right_arg,
+ Handle<AllocationSite>* allocation_site,
Token::Value op) {
Handle<Object> object = GetInfo(id);
if (!object->IsCode()) {
@@ -417,6 +418,7 @@ void TypeFeedbackOracle::BinaryType(TypeFeedbackId id,
op > BinaryOpIC::State::LAST_TOKEN);
*left = *right = *result = handle(Type::None(), isolate_);
*fixed_right_arg = Maybe<int>();
+ *allocation_site = Handle<AllocationSite>::null();
return;
}
Handle<Code> code = Handle<Code>::cast(object);
@@ -428,6 +430,13 @@ void TypeFeedbackOracle::BinaryType(TypeFeedbackId id,
*right = state.GetRightType(isolate());
*result = state.GetResultType(isolate());
*fixed_right_arg = state.fixed_right_arg();
+
+ AllocationSite* first_allocation_site = code->FindFirstAllocationSite();
+ if (first_allocation_site != NULL) {
+ *allocation_site = handle(first_allocation_site);
+ } else {
+ *allocation_site = Handle<AllocationSite>::null();
+ }
}
« src/hydrogen.cc ('K') | « src/type-info.h ('k') | src/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698