OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 int mask = (1 << MemoryChunk::IN_FROM_SPACE) | 72 int mask = (1 << MemoryChunk::IN_FROM_SPACE) |
73 | (1 << MemoryChunk::IN_TO_SPACE); | 73 | (1 << MemoryChunk::IN_TO_SPACE); |
74 // If non-zero, the page belongs to new-space. | 74 // If non-zero, the page belongs to new-space. |
75 test_b(Operand(scratch, MemoryChunk::kFlagsOffset), | 75 test_b(Operand(scratch, MemoryChunk::kFlagsOffset), |
76 static_cast<uint8_t>(mask)); | 76 static_cast<uint8_t>(mask)); |
77 j(cc, condition_met, condition_met_distance); | 77 j(cc, condition_met, condition_met_distance); |
78 } | 78 } |
79 | 79 |
80 | 80 |
81 void MacroAssembler::RememberedSetHelper( | 81 void MacroAssembler::RememberedSetHelper( |
| 82 Register object, // Only used for debug checks. |
82 Register addr, | 83 Register addr, |
83 Register scratch, | 84 Register scratch, |
84 SaveFPRegsMode save_fp, | 85 SaveFPRegsMode save_fp, |
85 MacroAssembler::RememberedSetFinalAction and_then) { | 86 MacroAssembler::RememberedSetFinalAction and_then) { |
86 Label done; | 87 Label done; |
| 88 if (FLAG_debug_code) { |
| 89 Label ok; |
| 90 JumpIfNotInNewSpace(object, scratch, &ok, Label::kNear); |
| 91 int3(); |
| 92 bind(&ok); |
| 93 } |
87 // Load store buffer top. | 94 // Load store buffer top. |
88 ExternalReference store_buffer = | 95 ExternalReference store_buffer = |
89 ExternalReference::store_buffer_top(isolate()); | 96 ExternalReference::store_buffer_top(isolate()); |
90 mov(scratch, Operand::StaticVariable(store_buffer)); | 97 mov(scratch, Operand::StaticVariable(store_buffer)); |
91 // Store pointer to buffer. | 98 // Store pointer to buffer. |
92 mov(Operand(scratch, 0), addr); | 99 mov(Operand(scratch, 0), addr); |
93 // Increment buffer top. | 100 // Increment buffer top. |
94 add(Operand(scratch), Immediate(kPointerSize)); | 101 add(Operand(scratch), Immediate(kPointerSize)); |
95 // Write back new top of buffer. | 102 // Write back new top of buffer. |
96 mov(Operand::StaticVariable(store_buffer), scratch); | 103 mov(Operand::StaticVariable(store_buffer), scratch); |
(...skipping 2511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2608 cmp(length, Operand(bitmap_scratch, MemoryChunk::kSizeOffset)); | 2615 cmp(length, Operand(bitmap_scratch, MemoryChunk::kSizeOffset)); |
2609 Check(less_equal, "Live Bytes Count overflow chunk size"); | 2616 Check(less_equal, "Live Bytes Count overflow chunk size"); |
2610 } | 2617 } |
2611 | 2618 |
2612 bind(&done); | 2619 bind(&done); |
2613 } | 2620 } |
2614 | 2621 |
2615 } } // namespace v8::internal | 2622 } } // namespace v8::internal |
2616 | 2623 |
2617 #endif // V8_TARGET_ARCH_IA32 | 2624 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |