Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index cc0d3d9f373dd9f100bbfa824b7fe1448066c4dd..d9ec1fb1ac7860869fedad00ad42a648ccd2f0a5 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -3026,6 +3026,33 @@ void FullCodeGenerator::EmitIsFunction(CallRuntime* expr) { |
} |
+void FullCodeGenerator::EmitIsMinusZero(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); |
+ |
+ Handle<Map> map = masm()->isolate()->factory()->heap_number_map(); |
+ __ CheckMap(rax, map, if_false, DO_SMI_CHECK); |
+ __ cmpl(FieldOperand(rax, HeapNumber::kExponentOffset), |
+ Immediate(0x80000000)); |
+ __ j(not_equal, if_false); |
+ __ cmpl(FieldOperand(rax, HeapNumber::kMantissaOffset), |
+ Immediate(0x00000000)); |
+ PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
+ Split(equal, if_true, if_false, fall_through); |
+ |
+ context()->Plug(if_true, if_false); |
+} |
+ |
+ |
void FullCodeGenerator::EmitIsArray(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
ASSERT(args->length() == 1); |