| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 Label done; | 158 Label done; |
| 159 | 159 |
| 160 // Skip barrier if writing a smi. | 160 // Skip barrier if writing a smi. |
| 161 ASSERT_EQ(0, kSmiTag); | 161 ASSERT_EQ(0, kSmiTag); |
| 162 test(value, Immediate(kSmiTagMask)); | 162 test(value, Immediate(kSmiTagMask)); |
| 163 j(zero, &done); | 163 j(zero, &done); |
| 164 | 164 |
| 165 if (Serializer::enabled()) { | 165 if (Serializer::enabled()) { |
| 166 // Can't do arithmetic on external references if it might get serialized. | 166 // Can't do arithmetic on external references if it might get serialized. |
| 167 mov(value, Operand(object)); | 167 mov(value, Operand(object)); |
| 168 and_(value, Heap::NewSpaceMask()); | 168 // The mask isn't really an address. We load it as an external reference in |
| 169 // case the size of the new space is different between the snapshot maker |
| 170 // and the running system. |
| 171 and_(Operand(value), Immediate(ExternalReference::new_space_mask())); |
| 169 cmp(Operand(value), Immediate(ExternalReference::new_space_start())); | 172 cmp(Operand(value), Immediate(ExternalReference::new_space_start())); |
| 170 j(equal, &done); | 173 j(equal, &done); |
| 171 } else { | 174 } else { |
| 172 int32_t new_space_start = reinterpret_cast<int32_t>( | 175 int32_t new_space_start = reinterpret_cast<int32_t>( |
| 173 ExternalReference::new_space_start().address()); | 176 ExternalReference::new_space_start().address()); |
| 174 lea(value, Operand(object, -new_space_start)); | 177 lea(value, Operand(object, -new_space_start)); |
| 175 and_(value, Heap::NewSpaceMask()); | 178 and_(value, Heap::NewSpaceMask()); |
| 176 j(equal, &done); | 179 j(equal, &done); |
| 177 } | 180 } |
| 178 | 181 |
| (...skipping 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1604 // Indicate that code has changed. | 1607 // Indicate that code has changed. |
| 1605 CPU::FlushICache(address_, size_); | 1608 CPU::FlushICache(address_, size_); |
| 1606 | 1609 |
| 1607 // Check that the code was patched as expected. | 1610 // Check that the code was patched as expected. |
| 1608 ASSERT(masm_.pc_ == address_ + size_); | 1611 ASSERT(masm_.pc_ == address_ + size_); |
| 1609 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 1612 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 1610 } | 1613 } |
| 1611 | 1614 |
| 1612 | 1615 |
| 1613 } } // namespace v8::internal | 1616 } } // namespace v8::internal |
| OLD | NEW |