| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1992 // String value -> false iff empty. | 1992 // String value -> false iff empty. |
| 1993 Label not_string; | 1993 Label not_string; |
| 1994 __ CmpInstanceType(map, FIRST_NONSTRING_TYPE); | 1994 __ CmpInstanceType(map, FIRST_NONSTRING_TYPE); |
| 1995 __ j(above_equal, ¬_string, Label::kNear); | 1995 __ j(above_equal, ¬_string, Label::kNear); |
| 1996 __ cmpq(FieldOperand(reg, String::kLengthOffset), Immediate(0)); | 1996 __ cmpq(FieldOperand(reg, String::kLengthOffset), Immediate(0)); |
| 1997 __ j(not_zero, instr->TrueLabel(chunk_)); | 1997 __ j(not_zero, instr->TrueLabel(chunk_)); |
| 1998 __ jmp(instr->FalseLabel(chunk_)); | 1998 __ jmp(instr->FalseLabel(chunk_)); |
| 1999 __ bind(¬_string); | 1999 __ bind(¬_string); |
| 2000 } | 2000 } |
| 2001 | 2001 |
| 2002 if (expected.Contains(ToBooleanStub::SYMBOL)) { |
| 2003 // Symbol value -> true. |
| 2004 __ CmpInstanceType(map, SYMBOL_TYPE); |
| 2005 __ j(equal, instr->TrueLabel(chunk_)); |
| 2006 } |
| 2007 |
| 2002 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { | 2008 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { |
| 2003 // heap number -> false iff +0, -0, or NaN. | 2009 // heap number -> false iff +0, -0, or NaN. |
| 2004 Label not_heap_number; | 2010 Label not_heap_number; |
| 2005 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex); | 2011 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex); |
| 2006 __ j(not_equal, ¬_heap_number, Label::kNear); | 2012 __ j(not_equal, ¬_heap_number, Label::kNear); |
| 2007 __ xorps(xmm0, xmm0); | 2013 __ xorps(xmm0, xmm0); |
| 2008 __ ucomisd(xmm0, FieldOperand(reg, HeapNumber::kValueOffset)); | 2014 __ ucomisd(xmm0, FieldOperand(reg, HeapNumber::kValueOffset)); |
| 2009 __ j(zero, instr->FalseLabel(chunk_)); | 2015 __ j(zero, instr->FalseLabel(chunk_)); |
| 2010 __ jmp(instr->TrueLabel(chunk_)); | 2016 __ jmp(instr->TrueLabel(chunk_)); |
| 2011 __ bind(¬_heap_number); | 2017 __ bind(¬_heap_number); |
| (...skipping 3552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5564 FixedArray::kHeaderSize - kPointerSize)); | 5570 FixedArray::kHeaderSize - kPointerSize)); |
| 5565 __ bind(&done); | 5571 __ bind(&done); |
| 5566 } | 5572 } |
| 5567 | 5573 |
| 5568 | 5574 |
| 5569 #undef __ | 5575 #undef __ |
| 5570 | 5576 |
| 5571 } } // namespace v8::internal | 5577 } } // namespace v8::internal |
| 5572 | 5578 |
| 5573 #endif // V8_TARGET_ARCH_X64 | 5579 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |