Index: src/ia32/code-stubs-ia32.cc |
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc |
index b30d5192f0a8550d0952d421f5d9a9d6bdbcf77c..70d507ad71f5e1b297eff05af7af3e57cc72a8f7 100644 |
--- a/src/ia32/code-stubs-ia32.cc |
+++ b/src/ia32/code-stubs-ia32.cc |
@@ -632,6 +632,14 @@ void ToBooleanStub::Generate(MacroAssembler* masm) { |
__ bind(¬_string); |
} |
+ if (types_.Contains(SYMBOL)) { |
+ // Symbol value -> true. |
+ Label not_symbol; |
+ __ CmpInstanceType(map, SYMBOL_TYPE); |
+ __ j(not_equal, ¬_symbol, Label::kNear); |
+ __ bind(¬_symbol); |
+ } |
+ |
if (types_.Contains(HEAP_NUMBER)) { |
// heap number -> false iff +0, -0, or NaN. |
Label not_heap_number, false_result; |