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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 | 283 |
284 __ li(exp_mask_reg, Operand(HeapNumber::kExponentMask)); | 284 __ li(exp_mask_reg, Operand(HeapNumber::kExponentMask)); |
285 | 285 |
286 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(), | 286 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(), |
287 // so we do the second best thing - test it ourselves. | 287 // so we do the second best thing - test it ourselves. |
288 // They are both equal and they are not both Smis so both of them are not | 288 // They are both equal and they are not both Smis so both of them are not |
289 // Smis. If it's not a heap number, then return equal. | 289 // Smis. If it's not a heap number, then return equal. |
290 if (cc == less || cc == greater) { | 290 if (cc == less || cc == greater) { |
291 __ GetObjectType(a0, t0, t0); | 291 __ GetObjectType(a0, t0, t0); |
292 __ Branch(slow, greater, t0, Operand(FIRST_SPEC_OBJECT_TYPE)); | 292 __ Branch(slow, greater, t0, Operand(FIRST_SPEC_OBJECT_TYPE)); |
293 __ GetObjectType(a0, t0, t0); | |
294 __ Branch(slow, eq, t0, Operand(SYMBOL_TYPE)); | 293 __ Branch(slow, eq, t0, Operand(SYMBOL_TYPE)); |
295 } else { | 294 } else { |
296 __ GetObjectType(a0, t0, t0); | 295 __ GetObjectType(a0, t0, t0); |
297 __ Branch(&heap_number, eq, t0, Operand(HEAP_NUMBER_TYPE)); | 296 __ Branch(&heap_number, eq, t0, Operand(HEAP_NUMBER_TYPE)); |
298 // Comparing JS objects with <=, >= is complicated. | 297 // Comparing JS objects with <=, >= is complicated. |
299 if (cc != eq) { | 298 if (cc != eq) { |
300 __ Branch(slow, greater, t0, Operand(FIRST_SPEC_OBJECT_TYPE)); | 299 __ Branch(slow, greater, t0, Operand(FIRST_SPEC_OBJECT_TYPE)); |
301 // Normally here we fall through to return_equal, but undefined is | 300 // Normally here we fall through to return_equal, but undefined is |
302 // special: (undefined == undefined) == true, but | 301 // special: (undefined == undefined) == true, but |
303 // (undefined <= undefined) == false! See ECMAScript 11.8.5. | 302 // (undefined <= undefined) == false! See ECMAScript 11.8.5. |
(...skipping 5411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5715 kStackUnwindSpace, kInvalidStackOffset, | 5714 kStackUnwindSpace, kInvalidStackOffset, |
5716 MemOperand(fp, 6 * kPointerSize), NULL); | 5715 MemOperand(fp, 6 * kPointerSize), NULL); |
5717 } | 5716 } |
5718 | 5717 |
5719 | 5718 |
5720 #undef __ | 5719 #undef __ |
5721 | 5720 |
5722 } } // namespace v8::internal | 5721 } } // namespace v8::internal |
5723 | 5722 |
5724 #endif // V8_TARGET_ARCH_MIPS64 | 5723 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |