Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/intrinsifier.h" | 8 #include "vm/intrinsifier.h" |
| 9 | 9 |
| 10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
| (...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1473 } | 1473 } |
| 1474 | 1474 |
| 1475 | 1475 |
| 1476 bool Intrinsifier::String_getIsEmpty(Assembler* assembler) { | 1476 bool Intrinsifier::String_getIsEmpty(Assembler* assembler) { |
| 1477 __ ldr(R0, Address(SP, 0 * kWordSize)); | 1477 __ ldr(R0, Address(SP, 0 * kWordSize)); |
| 1478 __ ldr(R0, FieldAddress(R0, String::length_offset())); | 1478 __ ldr(R0, FieldAddress(R0, String::length_offset())); |
| 1479 __ cmp(R0, ShifterOperand(Smi::RawValue(0))); | 1479 __ cmp(R0, ShifterOperand(Smi::RawValue(0))); |
| 1480 __ LoadObject(R0, Bool::True(), EQ); | 1480 __ LoadObject(R0, Bool::True(), EQ); |
| 1481 __ LoadObject(R0, Bool::False(), NE); | 1481 __ LoadObject(R0, Bool::False(), NE); |
| 1482 __ Ret(); | 1482 __ Ret(); |
| 1483 return true; | 1483 return false; |
|
srdjan
2013/08/23 14:54:04
Please add a comment why we need to generate 'slow
| |
| 1484 } | 1484 } |
| 1485 | 1485 |
| 1486 | 1486 |
| 1487 bool Intrinsifier::OneByteString_getHashCode(Assembler* assembler) { | 1487 bool Intrinsifier::OneByteString_getHashCode(Assembler* assembler) { |
| 1488 __ ldr(R1, Address(SP, 0 * kWordSize)); | 1488 __ ldr(R1, Address(SP, 0 * kWordSize)); |
| 1489 __ ldr(R0, FieldAddress(R1, String::hash_offset())); | 1489 __ ldr(R0, FieldAddress(R1, String::hash_offset())); |
| 1490 __ cmp(R0, ShifterOperand(0)); | 1490 __ cmp(R0, ShifterOperand(0)); |
| 1491 __ bx(LR, NE); // Return if already computed. | 1491 __ bx(LR, NE); // Return if already computed. |
| 1492 | 1492 |
| 1493 __ ldr(R2, FieldAddress(R1, String::length_offset())); | 1493 __ ldr(R2, FieldAddress(R1, String::length_offset())); |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1697 __ Bind(&ok); | 1697 __ Bind(&ok); |
| 1698 __ Ret(); | 1698 __ Ret(); |
| 1699 | 1699 |
| 1700 __ Bind(&fall_through); | 1700 __ Bind(&fall_through); |
| 1701 return false; | 1701 return false; |
| 1702 } | 1702 } |
| 1703 | 1703 |
| 1704 } // namespace dart | 1704 } // namespace dart |
| 1705 | 1705 |
| 1706 #endif // defined TARGET_ARCH_ARM | 1706 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |