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); |