OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 | 287 |
288 __ li(exp_mask_reg, Operand(HeapNumber::kExponentMask)); | 288 __ li(exp_mask_reg, Operand(HeapNumber::kExponentMask)); |
289 | 289 |
290 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(), | 290 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(), |
291 // so we do the second best thing - test it ourselves. | 291 // so we do the second best thing - test it ourselves. |
292 // They are both equal and they are not both Smis so both of them are not | 292 // They are both equal and they are not both Smis so both of them are not |
293 // Smis. If it's not a heap number, then return equal. | 293 // Smis. If it's not a heap number, then return equal. |
294 if (cc == less || cc == greater) { | 294 if (cc == less || cc == greater) { |
295 __ GetObjectType(a0, t4, t4); | 295 __ GetObjectType(a0, t4, t4); |
296 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE)); | 296 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE)); |
297 __ GetObjectType(a0, t4, t4); | |
298 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE)); | 297 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE)); |
299 } else { | 298 } else { |
300 __ GetObjectType(a0, t4, t4); | 299 __ GetObjectType(a0, t4, t4); |
301 __ Branch(&heap_number, eq, t4, Operand(HEAP_NUMBER_TYPE)); | 300 __ Branch(&heap_number, eq, t4, Operand(HEAP_NUMBER_TYPE)); |
302 // Comparing JS objects with <=, >= is complicated. | 301 // Comparing JS objects with <=, >= is complicated. |
303 if (cc != eq) { | 302 if (cc != eq) { |
304 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE)); | 303 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE)); |
305 // Normally here we fall through to return_equal, but undefined is | 304 // Normally here we fall through to return_equal, but undefined is |
306 // special: (undefined == undefined) == true, but | 305 // special: (undefined == undefined) == true, but |
307 // (undefined <= undefined) == false! See ECMAScript 11.8.5. | 306 // (undefined <= undefined) == false! See ECMAScript 11.8.5. |
(...skipping 5364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5672 kStackUnwindSpace, kInvalidStackOffset, | 5671 kStackUnwindSpace, kInvalidStackOffset, |
5673 MemOperand(fp, 6 * kPointerSize), NULL); | 5672 MemOperand(fp, 6 * kPointerSize), NULL); |
5674 } | 5673 } |
5675 | 5674 |
5676 | 5675 |
5677 #undef __ | 5676 #undef __ |
5678 | 5677 |
5679 } } // namespace v8::internal | 5678 } } // namespace v8::internal |
5680 | 5679 |
5681 #endif // V8_TARGET_ARCH_MIPS | 5680 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |