OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 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 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1653 Label ok; | 1653 Label ok; |
1654 Condition is_smi = CheckSmi(object); | 1654 Condition is_smi = CheckSmi(object); |
1655 j(is_smi, &ok); | 1655 j(is_smi, &ok); |
1656 Cmp(FieldOperand(object, HeapObject::kMapOffset), | 1656 Cmp(FieldOperand(object, HeapObject::kMapOffset), |
1657 Factory::heap_number_map()); | 1657 Factory::heap_number_map()); |
1658 Assert(equal, msg); | 1658 Assert(equal, msg); |
1659 bind(&ok); | 1659 bind(&ok); |
1660 } | 1660 } |
1661 | 1661 |
1662 | 1662 |
| 1663 void MacroAssembler::AbortIfNotSmi(Register object, const char* msg) { |
| 1664 Label ok; |
| 1665 Condition is_smi = CheckSmi(object); |
| 1666 j(is_smi, &ok); |
| 1667 Assert(equal, msg); |
| 1668 bind(&ok); |
| 1669 } |
| 1670 |
| 1671 |
1663 Condition MacroAssembler::IsObjectStringType(Register heap_object, | 1672 Condition MacroAssembler::IsObjectStringType(Register heap_object, |
1664 Register map, | 1673 Register map, |
1665 Register instance_type) { | 1674 Register instance_type) { |
1666 movq(map, FieldOperand(heap_object, HeapObject::kMapOffset)); | 1675 movq(map, FieldOperand(heap_object, HeapObject::kMapOffset)); |
1667 movzxbl(instance_type, FieldOperand(map, Map::kInstanceTypeOffset)); | 1676 movzxbl(instance_type, FieldOperand(map, Map::kInstanceTypeOffset)); |
1668 ASSERT(kNotStringTag != 0); | 1677 ASSERT(kNotStringTag != 0); |
1669 testb(instance_type, Immediate(kIsNotStringMask)); | 1678 testb(instance_type, Immediate(kIsNotStringMask)); |
1670 return zero; | 1679 return zero; |
1671 } | 1680 } |
1672 | 1681 |
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2628 CodePatcher::~CodePatcher() { | 2637 CodePatcher::~CodePatcher() { |
2629 // Indicate that code has changed. | 2638 // Indicate that code has changed. |
2630 CPU::FlushICache(address_, size_); | 2639 CPU::FlushICache(address_, size_); |
2631 | 2640 |
2632 // Check that the code was patched as expected. | 2641 // Check that the code was patched as expected. |
2633 ASSERT(masm_.pc_ == address_ + size_); | 2642 ASSERT(masm_.pc_ == address_ + size_); |
2634 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2643 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
2635 } | 2644 } |
2636 | 2645 |
2637 } } // namespace v8::internal | 2646 } } // namespace v8::internal |
OLD | NEW |