OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1740 } | 1740 } |
1741 | 1741 |
1742 | 1742 |
1743 void MacroAssembler::AbortIfSmi(Register object) { | 1743 void MacroAssembler::AbortIfSmi(Register object) { |
1744 ASSERT_EQ(0, kSmiTag); | 1744 ASSERT_EQ(0, kSmiTag); |
1745 tst(object, Operand(kSmiTagMask)); | 1745 tst(object, Operand(kSmiTagMask)); |
1746 Assert(ne, "Operand is a smi"); | 1746 Assert(ne, "Operand is a smi"); |
1747 } | 1747 } |
1748 | 1748 |
1749 | 1749 |
| 1750 void MacroAssembler::AbortIfNotString(Register object) { |
| 1751 STATIC_ASSERT(kSmiTag == 0); |
| 1752 tst(object, Operand(kSmiTagMask)); |
| 1753 Assert(ne, "Operand is not a string"); |
| 1754 push(object); |
| 1755 ldr(object, FieldMemOperand(object, HeapObject::kMapOffset)); |
| 1756 CompareInstanceType(object, object, FIRST_NONSTRING_TYPE); |
| 1757 pop(object); |
| 1758 Assert(lo, "Operand is not a string"); |
| 1759 } |
| 1760 |
| 1761 |
1750 void MacroAssembler::JumpIfNonSmisNotBothSequentialAsciiStrings( | 1762 void MacroAssembler::JumpIfNonSmisNotBothSequentialAsciiStrings( |
1751 Register first, | 1763 Register first, |
1752 Register second, | 1764 Register second, |
1753 Register scratch1, | 1765 Register scratch1, |
1754 Register scratch2, | 1766 Register scratch2, |
1755 Label* failure) { | 1767 Label* failure) { |
1756 // Test that both first and second are sequential ASCII strings. | 1768 // Test that both first and second are sequential ASCII strings. |
1757 // Assume that they are non-smis. | 1769 // Assume that they are non-smis. |
1758 ldr(scratch1, FieldMemOperand(first, HeapObject::kMapOffset)); | 1770 ldr(scratch1, FieldMemOperand(first, HeapObject::kMapOffset)); |
1759 ldr(scratch2, FieldMemOperand(second, HeapObject::kMapOffset)); | 1771 ldr(scratch2, FieldMemOperand(second, HeapObject::kMapOffset)); |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2002 | 2014 |
2003 void CodePatcher::Emit(Address addr) { | 2015 void CodePatcher::Emit(Address addr) { |
2004 masm()->emit(reinterpret_cast<Instr>(addr)); | 2016 masm()->emit(reinterpret_cast<Instr>(addr)); |
2005 } | 2017 } |
2006 #endif // ENABLE_DEBUGGER_SUPPORT | 2018 #endif // ENABLE_DEBUGGER_SUPPORT |
2007 | 2019 |
2008 | 2020 |
2009 } } // namespace v8::internal | 2021 } } // namespace v8::internal |
2010 | 2022 |
2011 #endif // V8_TARGET_ARCH_ARM | 2023 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |