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

Unified Diff: src/code-stubs-hydrogen.cc

Issue 79343009: Rework BuildCheckString() to be compatible with the other BuildCheck*() methods. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 | « no previous file | src/hydrogen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs-hydrogen.cc
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
index 62e19e12755bab3cd7d410e613bc421f468b12b0..0e690cb3e9542e8a42c21c0f7591beaa39c9f90a 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -992,16 +992,10 @@ HValue* CodeStubGraphBuilder<NewStringAddStub>::BuildCodeInitializedStub() {
// Make sure that both arguments are strings if not known in advance.
if ((flags & STRING_ADD_CHECK_LEFT) == STRING_ADD_CHECK_LEFT) {
- IfBuilder if_leftnotstring(this);
- if_leftnotstring.IfNot<HIsStringAndBranch>(left);
- if_leftnotstring.Then();
- if_leftnotstring.Deopt("Expected string for LHS of string addition");
+ left = BuildCheckString(left);
}
if ((flags & STRING_ADD_CHECK_RIGHT) == STRING_ADD_CHECK_RIGHT) {
- IfBuilder if_rightnotstring(this);
- if_rightnotstring.IfNot<HIsStringAndBranch>(right);
- if_rightnotstring.Then();
- if_rightnotstring.Deopt("Expected string for RHS of string addition");
+ right = BuildCheckString(right);
}
return BuildStringAdd(left, right, pretenure_flag);
« no previous file with comments | « no previous file | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698