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 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1560 void MacroAssembler::AssertRegisterIsRoot(Register reg, | 1560 void MacroAssembler::AssertRegisterIsRoot(Register reg, |
1561 Heap::RootListIndex index) { | 1561 Heap::RootListIndex index) { |
1562 if (FLAG_debug_code) { | 1562 if (FLAG_debug_code) { |
1563 LoadRoot(ip, index); | 1563 LoadRoot(ip, index); |
1564 cmp(reg, ip); | 1564 cmp(reg, ip); |
1565 Check(eq, "Register did not match expected root"); | 1565 Check(eq, "Register did not match expected root"); |
1566 } | 1566 } |
1567 } | 1567 } |
1568 | 1568 |
1569 | 1569 |
| 1570 void MacroAssembler::AssertFastElements(Register elements) { |
| 1571 if (FLAG_debug_code) { |
| 1572 ASSERT(!elements.is(ip)); |
| 1573 Label ok; |
| 1574 push(elements); |
| 1575 ldr(elements, FieldMemOperand(elements, HeapObject::kMapOffset)); |
| 1576 LoadRoot(ip, Heap::kFixedArrayMapRootIndex); |
| 1577 cmp(elements, ip); |
| 1578 b(eq, &ok); |
| 1579 LoadRoot(ip, Heap::kFixedCOWArrayMapRootIndex); |
| 1580 cmp(elements, ip); |
| 1581 b(eq, &ok); |
| 1582 Abort("JSObject with fast elements map has slow elements"); |
| 1583 bind(&ok); |
| 1584 pop(elements); |
| 1585 } |
| 1586 } |
| 1587 |
| 1588 |
1570 void MacroAssembler::Check(Condition cc, const char* msg) { | 1589 void MacroAssembler::Check(Condition cc, const char* msg) { |
1571 Label L; | 1590 Label L; |
1572 b(cc, &L); | 1591 b(cc, &L); |
1573 Abort(msg); | 1592 Abort(msg); |
1574 // will not return here | 1593 // will not return here |
1575 bind(&L); | 1594 bind(&L); |
1576 } | 1595 } |
1577 | 1596 |
1578 | 1597 |
1579 void MacroAssembler::Abort(const char* msg) { | 1598 void MacroAssembler::Abort(const char* msg) { |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1917 | 1936 |
1918 void CodePatcher::Emit(Address addr) { | 1937 void CodePatcher::Emit(Address addr) { |
1919 masm()->emit(reinterpret_cast<Instr>(addr)); | 1938 masm()->emit(reinterpret_cast<Instr>(addr)); |
1920 } | 1939 } |
1921 #endif // ENABLE_DEBUGGER_SUPPORT | 1940 #endif // ENABLE_DEBUGGER_SUPPORT |
1922 | 1941 |
1923 | 1942 |
1924 } } // namespace v8::internal | 1943 } } // namespace v8::internal |
1925 | 1944 |
1926 #endif // V8_TARGET_ARCH_ARM | 1945 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |