Chromium Code Reviews| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 93 // "simpler" instructions | 93 // "simpler" instructions |
| 94 bind(&fast); | 94 bind(&fast); |
| 95 bts(Operand(page_start, Page::kRSetOffset), pointer_offset); | 95 bts(Operand(page_start, Page::kRSetOffset), pointer_offset); |
| 96 } | 96 } |
| 97 | 97 |
| 98 | 98 |
| 99 void MacroAssembler::InNewSpace(Register object, | 99 void MacroAssembler::InNewSpace(Register object, |
| 100 Register scratch, | 100 Register scratch, |
| 101 Condition cc, | 101 Condition cc, |
| 102 Label* branch) { | 102 Label* branch) { |
| 103 ASSERT(cc == equal || cc == not_equal); | |
|
Lasse Reichstein
2010/04/29 12:15:47
Use a boolean instead of only allowing a subset of
| |
| 103 if (Serializer::enabled()) { | 104 if (Serializer::enabled()) { |
| 104 // Can't do arithmetic on external references if it might get serialized. | 105 // Can't do arithmetic on external references if it might get serialized. |
| 105 mov(scratch, Operand(object)); | 106 mov(scratch, Operand(object)); |
| 106 // The mask isn't really an address. We load it as an external reference in | 107 // The mask isn't really an address. We load it as an external reference in |
| 107 // case the size of the new space is different between the snapshot maker | 108 // case the size of the new space is different between the snapshot maker |
| 108 // and the running system. | 109 // and the running system. |
| 109 and_(Operand(scratch), Immediate(ExternalReference::new_space_mask())); | 110 and_(Operand(scratch), Immediate(ExternalReference::new_space_mask())); |
| 110 cmp(Operand(scratch), Immediate(ExternalReference::new_space_start())); | 111 cmp(Operand(scratch), Immediate(ExternalReference::new_space_start())); |
| 111 j(cc, branch); | 112 j(cc, branch); |
| 112 } else { | 113 } else { |
| (...skipping 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1686 // Indicate that code has changed. | 1687 // Indicate that code has changed. |
| 1687 CPU::FlushICache(address_, size_); | 1688 CPU::FlushICache(address_, size_); |
| 1688 | 1689 |
| 1689 // Check that the code was patched as expected. | 1690 // Check that the code was patched as expected. |
| 1690 ASSERT(masm_.pc_ == address_ + size_); | 1691 ASSERT(masm_.pc_ == address_ + size_); |
| 1691 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 1692 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 1692 } | 1693 } |
| 1693 | 1694 |
| 1694 | 1695 |
| 1695 } } // namespace v8::internal | 1696 } } // namespace v8::internal |
| OLD | NEW |