| Index: src/x64/codegen-x64.cc
|
| diff --git a/src/x64/codegen-x64.cc b/src/x64/codegen-x64.cc
|
| index bf454e21494f1a062b5cae21521d4aaf012f7849..55cfdc933fce065e21ce7d4c723a6421ab1ca440 100644
|
| --- a/src/x64/codegen-x64.cc
|
| +++ b/src/x64/codegen-x64.cc
|
| @@ -2338,15 +2338,15 @@ void CodeGenerator::GenericBinaryOperation(Token::Value op,
|
| Result left = frame_->Pop();
|
|
|
| if (op == Token::ADD) {
|
| - bool left_is_string = left.static_type().is_jsstring();
|
| - bool right_is_string = right.static_type().is_jsstring();
|
| + bool left_is_string = left.is_constant() && left.handle()->IsString();
|
| + bool right_is_string = right.is_constant() && right.handle()->IsString();
|
| if (left_is_string || right_is_string) {
|
| frame_->Push(&left);
|
| frame_->Push(&right);
|
| Result answer;
|
| if (left_is_string) {
|
| if (right_is_string) {
|
| - // TODO(lrn): if (left.is_constant() && right.is_constant())
|
| + // TODO(lrn): if both are constant strings
|
| // -- do a compile time cons, if allocation during codegen is allowed.
|
| answer = frame_->CallRuntime(Runtime::kStringAdd, 2);
|
| } else {
|
| @@ -2357,7 +2357,6 @@ void CodeGenerator::GenericBinaryOperation(Token::Value op,
|
| answer =
|
| frame_->InvokeBuiltin(Builtins::STRING_ADD_RIGHT, CALL_FUNCTION, 2);
|
| }
|
| - answer.set_static_type(StaticType::jsstring());
|
| frame_->Push(&answer);
|
| return;
|
| }
|
|
|