Index: src/mips/full-codegen-mips.cc |
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc |
index 7f2cf652effd517c97e82dcbcb9e4196c3f855aa..056e2eef08771114f0456e216692325fb0b847bd 100644 |
--- a/src/mips/full-codegen-mips.cc |
+++ b/src/mips/full-codegen-mips.cc |
@@ -2780,6 +2780,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(v0, if_false); |
+ __ GetObjectType(v0, a1, a2); |
+ PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
+ Split(eq, a2, Operand(SYMBOL_TYPE), 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); |
@@ -4329,6 +4351,10 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr, |
__ LoadRoot(at, Heap::kNullValueRootIndex); |
__ Branch(if_true, eq, v0, Operand(at)); |
} |
+ if (FLAG_harmony_symbols) { |
+ __ GetObjectType(v0, v0, a1); |
+ __ Branch(if_true, eq, a1, Operand(SYMBOL_TYPE)); |
+ } |
// Check for JS objects => true. |
__ GetObjectType(v0, v0, a1); |
__ Branch(if_false, lt, a1, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); |