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 } else { | 299 } else { |
298 __ GetObjectType(a0, t4, t4); | 300 __ GetObjectType(a0, t4, t4); |
299 __ Branch(&heap_number, eq, t4, Operand(HEAP_NUMBER_TYPE)); | 301 __ Branch(&heap_number, eq, t4, Operand(HEAP_NUMBER_TYPE)); |
300 // Comparing JS objects with <=, >= is complicated. | 302 // Comparing JS objects with <=, >= is complicated. |
301 if (cc != eq) { | 303 if (cc != eq) { |
302 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE)); | 304 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE)); |
303 // Normally here we fall through to return_equal, but undefined is | 305 // Normally here we fall through to return_equal, but undefined is |
304 // special: (undefined == undefined) == true, but | 306 // special: (undefined == undefined) == true, but |
305 // (undefined <= undefined) == false! See ECMAScript 11.8.5. | 307 // (undefined <= undefined) == false! See ECMAScript 11.8.5. |
306 if (cc == less_equal || cc == greater_equal) { | 308 if (cc == less_equal || cc == greater_equal) { |
(...skipping 5187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5494 kStackUnwindSpace, kInvalidStackOffset, | 5496 kStackUnwindSpace, kInvalidStackOffset, |
5495 MemOperand(fp, 6 * kPointerSize), NULL); | 5497 MemOperand(fp, 6 * kPointerSize), NULL); |
5496 } | 5498 } |
5497 | 5499 |
5498 | 5500 |
5499 #undef __ | 5501 #undef __ |
5500 | 5502 |
5501 } } // namespace v8::internal | 5503 } } // namespace v8::internal |
5502 | 5504 |
5503 #endif // V8_TARGET_ARCH_MIPS | 5505 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |