HIsStringAndBranch does an implicit SMI check if necessary.
No need to test for SMI first using HIsSmiAndBranch. R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/27160002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17175 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
8ad8ff10e3
commit
0a9425e756
@ -885,8 +885,7 @@ HValue* CodeStubGraphBuilder<BinaryOpStub>::BuildCodeInitializedStub() {
|
||||
// critical.
|
||||
if (left_type->Maybe(Type::String())) {
|
||||
IfBuilder left_string(this);
|
||||
left_string.IfNot<HIsSmiAndBranch>(left);
|
||||
left_string.AndIf<HIsStringAndBranch>(left);
|
||||
left_string.If<HIsStringAndBranch>(left);
|
||||
left_string.Then();
|
||||
Push(Add<HStringAdd>(left, right, STRING_ADD_CHECK_RIGHT));
|
||||
left_string.Else();
|
||||
@ -897,8 +896,7 @@ HValue* CodeStubGraphBuilder<BinaryOpStub>::BuildCodeInitializedStub() {
|
||||
result = Pop();
|
||||
} else {
|
||||
IfBuilder right_string(this);
|
||||
right_string.IfNot<HIsSmiAndBranch>(right);
|
||||
right_string.AndIf<HIsStringAndBranch>(right);
|
||||
right_string.If<HIsStringAndBranch>(right);
|
||||
right_string.Then();
|
||||
Push(Add<HStringAdd>(left, right, STRING_ADD_CHECK_LEFT));
|
||||
right_string.Else();
|
||||
|
Loading…
Reference in New Issue
Block a user