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_ARM | 7 #if V8_TARGET_ARCH_ARM |
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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 // so we do the second best thing - test it ourselves. | 248 // so we do the second best thing - test it ourselves. |
249 // They are both equal and they are not both Smis so both of them are not | 249 // They are both equal and they are not both Smis so both of them are not |
250 // Smis. If it's not a heap number, then return equal. | 250 // Smis. If it's not a heap number, then return equal. |
251 if (cond == lt || cond == gt) { | 251 if (cond == lt || cond == gt) { |
252 // Call runtime on identical JSObjects. | 252 // Call runtime on identical JSObjects. |
253 __ CompareObjectType(r0, r4, r4, FIRST_SPEC_OBJECT_TYPE); | 253 __ CompareObjectType(r0, r4, r4, FIRST_SPEC_OBJECT_TYPE); |
254 __ b(ge, slow); | 254 __ b(ge, slow); |
255 // Call runtime on identical symbols since we need to throw a TypeError. | 255 // Call runtime on identical symbols since we need to throw a TypeError. |
256 __ cmp(r4, Operand(SYMBOL_TYPE)); | 256 __ cmp(r4, Operand(SYMBOL_TYPE)); |
257 __ b(eq, slow); | 257 __ b(eq, slow); |
258 // Call runtime on identical SIMD values since we must throw a TypeError. | |
259 __ cmp(r4, Operand(FLOAT32X4_TYPE)); | |
260 __ b(eq, slow); | |
261 if (is_strong(strength)) { | 258 if (is_strong(strength)) { |
262 // Call the runtime on anything that is converted in the semantics, since | 259 // Call the runtime on anything that is converted in the semantics, since |
263 // we need to throw a TypeError. Smis have already been ruled out. | 260 // we need to throw a TypeError. Smis have already been ruled out. |
264 __ cmp(r4, Operand(HEAP_NUMBER_TYPE)); | 261 __ cmp(r4, Operand(HEAP_NUMBER_TYPE)); |
265 __ b(eq, &return_equal); | 262 __ b(eq, &return_equal); |
266 __ tst(r4, Operand(kIsNotStringMask)); | 263 __ tst(r4, Operand(kIsNotStringMask)); |
267 __ b(ne, slow); | 264 __ b(ne, slow); |
268 } | 265 } |
269 } else { | 266 } else { |
270 __ CompareObjectType(r0, r4, r4, HEAP_NUMBER_TYPE); | 267 __ CompareObjectType(r0, r4, r4, HEAP_NUMBER_TYPE); |
271 __ b(eq, &heap_number); | 268 __ b(eq, &heap_number); |
272 // Comparing JS objects with <=, >= is complicated. | 269 // Comparing JS objects with <=, >= is complicated. |
273 if (cond != eq) { | 270 if (cond != eq) { |
274 __ cmp(r4, Operand(FIRST_SPEC_OBJECT_TYPE)); | 271 __ cmp(r4, Operand(FIRST_SPEC_OBJECT_TYPE)); |
275 __ b(ge, slow); | 272 __ b(ge, slow); |
276 // Call runtime on identical symbols since we need to throw a TypeError. | 273 // Call runtime on identical symbols since we need to throw a TypeError. |
277 __ cmp(r4, Operand(SYMBOL_TYPE)); | 274 __ cmp(r4, Operand(SYMBOL_TYPE)); |
278 __ b(eq, slow); | 275 __ b(eq, slow); |
279 // Call runtime on identical SIMD values since we must throw a TypeError. | |
280 __ cmp(r4, Operand(FLOAT32X4_TYPE)); | |
281 __ b(eq, slow); | |
282 if (is_strong(strength)) { | 276 if (is_strong(strength)) { |
283 // Call the runtime on anything that is converted in the semantics, | 277 // Call the runtime on anything that is converted in the semantics, |
284 // since we need to throw a TypeError. Smis and heap numbers have | 278 // since we need to throw a TypeError. Smis and heap numbers have |
285 // already been ruled out. | 279 // already been ruled out. |
286 __ tst(r4, Operand(kIsNotStringMask)); | 280 __ tst(r4, Operand(kIsNotStringMask)); |
287 __ b(ne, slow); | 281 __ b(ne, slow); |
288 } | 282 } |
289 // Normally here we fall through to return_equal, but undefined is | 283 // Normally here we fall through to return_equal, but undefined is |
290 // special: (undefined == undefined) == true, but | 284 // special: (undefined == undefined) == true, but |
291 // (undefined <= undefined) == false! See ECMAScript 11.8.5. | 285 // (undefined <= undefined) == false! See ECMAScript 11.8.5. |
(...skipping 5084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5376 MemOperand(fp, 6 * kPointerSize), NULL); | 5370 MemOperand(fp, 6 * kPointerSize), NULL); |
5377 } | 5371 } |
5378 | 5372 |
5379 | 5373 |
5380 #undef __ | 5374 #undef __ |
5381 | 5375 |
5382 } // namespace internal | 5376 } // namespace internal |
5383 } // namespace v8 | 5377 } // namespace v8 |
5384 | 5378 |
5385 #endif // V8_TARGET_ARCH_ARM | 5379 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |