| 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 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1591 Label* fail, | 1591 Label* fail, |
| 1592 bool is_heap_object) { | 1592 bool is_heap_object) { |
| 1593 if (!is_heap_object) { | 1593 if (!is_heap_object) { |
| 1594 JumpIfSmi(obj, fail); | 1594 JumpIfSmi(obj, fail); |
| 1595 } | 1595 } |
| 1596 Cmp(FieldOperand(obj, HeapObject::kMapOffset), map); | 1596 Cmp(FieldOperand(obj, HeapObject::kMapOffset), map); |
| 1597 j(not_equal, fail); | 1597 j(not_equal, fail); |
| 1598 } | 1598 } |
| 1599 | 1599 |
| 1600 | 1600 |
| 1601 void MacroAssembler::AbortIfNotNumber(Register object, const char* msg) { |
| 1602 Label ok; |
| 1603 Condition is_smi = CheckSmi(object); |
| 1604 j(is_smi, &ok); |
| 1605 Cmp(FieldOperand(object, HeapObject::kMapOffset), |
| 1606 Factory::heap_number_map()); |
| 1607 Assert(equal, msg); |
| 1608 bind(&ok); |
| 1609 } |
| 1610 |
| 1611 |
| 1601 Condition MacroAssembler::IsObjectStringType(Register heap_object, | 1612 Condition MacroAssembler::IsObjectStringType(Register heap_object, |
| 1602 Register map, | 1613 Register map, |
| 1603 Register instance_type) { | 1614 Register instance_type) { |
| 1604 movq(map, FieldOperand(heap_object, HeapObject::kMapOffset)); | 1615 movq(map, FieldOperand(heap_object, HeapObject::kMapOffset)); |
| 1605 movzxbl(instance_type, FieldOperand(map, Map::kInstanceTypeOffset)); | 1616 movzxbl(instance_type, FieldOperand(map, Map::kInstanceTypeOffset)); |
| 1606 ASSERT(kNotStringTag != 0); | 1617 ASSERT(kNotStringTag != 0); |
| 1607 testb(instance_type, Immediate(kIsNotStringMask)); | 1618 testb(instance_type, Immediate(kIsNotStringMask)); |
| 1608 return zero; | 1619 return zero; |
| 1609 } | 1620 } |
| 1610 | 1621 |
| (...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2566 CodePatcher::~CodePatcher() { | 2577 CodePatcher::~CodePatcher() { |
| 2567 // Indicate that code has changed. | 2578 // Indicate that code has changed. |
| 2568 CPU::FlushICache(address_, size_); | 2579 CPU::FlushICache(address_, size_); |
| 2569 | 2580 |
| 2570 // Check that the code was patched as expected. | 2581 // Check that the code was patched as expected. |
| 2571 ASSERT(masm_.pc_ == address_ + size_); | 2582 ASSERT(masm_.pc_ == address_ + size_); |
| 2572 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2583 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 2573 } | 2584 } |
| 2574 | 2585 |
| 2575 } } // namespace v8::internal | 2586 } } // namespace v8::internal |
| OLD | NEW |