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

Unified Diff: src/hydrogen-instructions.cc

Issue 106313003: Reland "Allocation site support for monomorphic StringAdds in BinaryOps". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 12 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/hydrogen-instructions.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index a3bc56ca4306d77c8914da1ce5cc1a1a14f102e8..49916687696b4d6b05cf4caf524bc74ce7e3db25 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -3815,7 +3815,9 @@ HInstruction* HStringAdd::New(Zone* zone,
HValue* context,
HValue* left,
HValue* right,
- StringAddFlags flags) {
+ PretenureFlag pretenure_flag,
+ StringAddFlags flags,
+ Handle<AllocationSite> allocation_site) {
if (FLAG_fold_constants && left->IsConstant() && right->IsConstant()) {
HConstant* c_right = HConstant::cast(right);
HConstant* c_left = HConstant::cast(left);
@@ -3825,7 +3827,23 @@ HInstruction* HStringAdd::New(Zone* zone,
return HConstant::New(zone, context, concat);
}
}
- return new(zone) HStringAdd(context, left, right, flags);
+ return new(zone) HStringAdd(
+ context, left, right, pretenure_flag, flags, allocation_site);
+}
+
+
+void HStringAdd::PrintDataTo(StringStream* stream) {
+ if ((flags() & STRING_ADD_CHECK_BOTH) == STRING_ADD_CHECK_BOTH) {
+ stream->Add("_CheckBoth");
+ } else if ((flags() & STRING_ADD_CHECK_BOTH) == STRING_ADD_CHECK_LEFT) {
+ stream->Add("_CheckLeft");
+ } else if ((flags() & STRING_ADD_CHECK_BOTH) == STRING_ADD_CHECK_RIGHT) {
+ stream->Add("_CheckRight");
+ }
+ stream->Add(" (");
+ if (pretenure_flag() == NOT_TENURED) stream->Add("N");
+ else if (pretenure_flag() == TENURED) stream->Add("D");
+ stream->Add(")");
}
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698