| Index: src/x64/full-codegen-x64.cc
|
| diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
|
| index eef9dc2afae81008138a6cdb61bf1330dbe68d18..34de83346151f9cb5b6b784669fc7cf0eadc7d43 100644
|
| --- a/src/x64/full-codegen-x64.cc
|
| +++ b/src/x64/full-codegen-x64.cc
|
| @@ -2660,6 +2660,28 @@ void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf(
|
| }
|
|
|
|
|
| +void FullCodeGenerator::EmitIsSymbol(CallRuntime* expr) {
|
| + ZoneList<Expression*>* args = expr->arguments();
|
| + ASSERT(args->length() == 1);
|
| +
|
| + VisitForAccumulatorValue(args->at(0));
|
| +
|
| + Label materialize_true, materialize_false;
|
| + Label* if_true = NULL;
|
| + Label* if_false = NULL;
|
| + Label* fall_through = NULL;
|
| + context()->PrepareTest(&materialize_true, &materialize_false,
|
| + &if_true, &if_false, &fall_through);
|
| +
|
| + __ JumpIfSmi(rax, if_false);
|
| + __ CmpObjectType(rax, SYMBOL_TYPE, rbx);
|
| + PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
|
| + Split(equal, if_true, if_false, fall_through);
|
| +
|
| + context()->Plug(if_true, if_false);
|
| +}
|
| +
|
| +
|
| void FullCodeGenerator::EmitIsFunction(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| ASSERT(args->length() == 1);
|
| @@ -4259,6 +4281,10 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr,
|
| __ CompareRoot(rax, Heap::kNullValueRootIndex);
|
| __ j(equal, if_true);
|
| }
|
| + if (FLAG_harmony_symbols) {
|
| + __ CmpObjectType(rax, SYMBOL_TYPE, rdx);
|
| + __ j(equal, if_true);
|
| + }
|
| __ CmpObjectType(rax, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, rdx);
|
| __ j(below, if_false);
|
| __ CmpInstanceType(rdx, LAST_NONCALLABLE_SPEC_OBJECT_TYPE);
|
|
|