| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2079 __ jmp(false_label); | 2079 __ jmp(false_label); |
| 2080 __ bind(¬_string); | 2080 __ bind(¬_string); |
| 2081 } | 2081 } |
| 2082 | 2082 |
| 2083 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { | 2083 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { |
| 2084 // heap number -> false iff +0, -0, or NaN. | 2084 // heap number -> false iff +0, -0, or NaN. |
| 2085 Label not_heap_number; | 2085 Label not_heap_number; |
| 2086 __ cmp(FieldOperand(reg, HeapObject::kMapOffset), | 2086 __ cmp(FieldOperand(reg, HeapObject::kMapOffset), |
| 2087 factory()->heap_number_map()); | 2087 factory()->heap_number_map()); |
| 2088 __ j(not_equal, ¬_heap_number, Label::kNear); | 2088 __ j(not_equal, ¬_heap_number, Label::kNear); |
| 2089 __ fldz(); | 2089 __ xorps(xmm0, xmm0); |
| 2090 __ fld_d(FieldOperand(reg, HeapNumber::kValueOffset)); | 2090 __ ucomisd(xmm0, FieldOperand(reg, HeapNumber::kValueOffset)); |
| 2091 __ FCmp(); | |
| 2092 __ j(zero, false_label); | 2091 __ j(zero, false_label); |
| 2093 __ jmp(true_label); | 2092 __ jmp(true_label); |
| 2094 __ bind(¬_heap_number); | 2093 __ bind(¬_heap_number); |
| 2095 } | 2094 } |
| 2096 | 2095 |
| 2097 // We've seen something for the first time -> deopt. | 2096 // We've seen something for the first time -> deopt. |
| 2098 DeoptimizeIf(no_condition, instr->environment()); | 2097 DeoptimizeIf(no_condition, instr->environment()); |
| 2099 } | 2098 } |
| 2100 } | 2099 } |
| 2101 } | 2100 } |
| (...skipping 4076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6178 FixedArray::kHeaderSize - kPointerSize)); | 6177 FixedArray::kHeaderSize - kPointerSize)); |
| 6179 __ bind(&done); | 6178 __ bind(&done); |
| 6180 } | 6179 } |
| 6181 | 6180 |
| 6182 | 6181 |
| 6183 #undef __ | 6182 #undef __ |
| 6184 | 6183 |
| 6185 } } // namespace v8::internal | 6184 } } // namespace v8::internal |
| 6186 | 6185 |
| 6187 #endif // V8_TARGET_ARCH_IA32 | 6186 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |