| 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 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 6 | 6 |
| 7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 // so we do the second best thing - test it ourselves. | 188 // so we do the second best thing - test it ourselves. |
| 189 // They are both equal and they are not both Smis so both of them are not | 189 // They are both equal and they are not both Smis so both of them are not |
| 190 // Smis. If it's not a heap number, then return equal. | 190 // Smis. If it's not a heap number, then return equal. |
| 191 if (cond == lt || cond == gt) { | 191 if (cond == lt || cond == gt) { |
| 192 // Call runtime on identical JSObjects. | 192 // Call runtime on identical JSObjects. |
| 193 __ CompareObjectType(r0, r4, r4, FIRST_JS_RECEIVER_TYPE); | 193 __ CompareObjectType(r0, r4, r4, FIRST_JS_RECEIVER_TYPE); |
| 194 __ b(ge, slow); | 194 __ b(ge, slow); |
| 195 // Call runtime on identical symbols since we need to throw a TypeError. | 195 // Call runtime on identical symbols since we need to throw a TypeError. |
| 196 __ cmp(r4, Operand(SYMBOL_TYPE)); | 196 __ cmp(r4, Operand(SYMBOL_TYPE)); |
| 197 __ b(eq, slow); | 197 __ b(eq, slow); |
| 198 // Call runtime on identical SIMD values since we must throw a TypeError. |
| 199 __ cmp(r4, Operand(SIMD128_VALUE_TYPE)); |
| 200 __ b(eq, slow); |
| 198 } else { | 201 } else { |
| 199 __ CompareObjectType(r0, r4, r4, HEAP_NUMBER_TYPE); | 202 __ CompareObjectType(r0, r4, r4, HEAP_NUMBER_TYPE); |
| 200 __ b(eq, &heap_number); | 203 __ b(eq, &heap_number); |
| 201 // Comparing JS objects with <=, >= is complicated. | 204 // Comparing JS objects with <=, >= is complicated. |
| 202 if (cond != eq) { | 205 if (cond != eq) { |
| 203 __ cmp(r4, Operand(FIRST_JS_RECEIVER_TYPE)); | 206 __ cmp(r4, Operand(FIRST_JS_RECEIVER_TYPE)); |
| 204 __ b(ge, slow); | 207 __ b(ge, slow); |
| 205 // Call runtime on identical symbols since we need to throw a TypeError. | 208 // Call runtime on identical symbols since we need to throw a TypeError. |
| 206 __ cmp(r4, Operand(SYMBOL_TYPE)); | 209 __ cmp(r4, Operand(SYMBOL_TYPE)); |
| 207 __ b(eq, slow); | 210 __ b(eq, slow); |
| 211 // Call runtime on identical SIMD values since we must throw a TypeError. |
| 212 __ cmp(r4, Operand(SIMD128_VALUE_TYPE)); |
| 213 __ b(eq, slow); |
| 208 // Normally here we fall through to return_equal, but undefined is | 214 // Normally here we fall through to return_equal, but undefined is |
| 209 // special: (undefined == undefined) == true, but | 215 // special: (undefined == undefined) == true, but |
| 210 // (undefined <= undefined) == false! See ECMAScript 11.8.5. | 216 // (undefined <= undefined) == false! See ECMAScript 11.8.5. |
| 211 if (cond == le || cond == ge) { | 217 if (cond == le || cond == ge) { |
| 212 __ cmp(r4, Operand(ODDBALL_TYPE)); | 218 __ cmp(r4, Operand(ODDBALL_TYPE)); |
| 213 __ b(ne, &return_equal); | 219 __ b(ne, &return_equal); |
| 214 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); | 220 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); |
| 215 __ cmp(r0, r2); | 221 __ cmp(r0, r2); |
| 216 __ b(ne, &return_equal); | 222 __ b(ne, &return_equal); |
| 217 if (cond == le) { | 223 if (cond == le) { |
| (...skipping 3100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3318 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, | 3324 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, |
| 3319 kStackUnwindSpace, NULL, return_value_operand, NULL); | 3325 kStackUnwindSpace, NULL, return_value_operand, NULL); |
| 3320 } | 3326 } |
| 3321 | 3327 |
| 3322 #undef __ | 3328 #undef __ |
| 3323 | 3329 |
| 3324 } // namespace internal | 3330 } // namespace internal |
| 3325 } // namespace v8 | 3331 } // namespace v8 |
| 3326 | 3332 |
| 3327 #endif // V8_TARGET_ARCH_ARM | 3333 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |