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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 uint32_t stack_check_address_offset = Memory::uint16_at(pc_after - | 166 uint32_t stack_check_address_offset = Memory::uint16_at(pc_after - |
167 2 * kInstrSize) & 0xfff; | 167 2 * kInstrSize) & 0xfff; |
168 Address stack_check_address_pointer = pc_after + stack_check_address_offset; | 168 Address stack_check_address_pointer = pc_after + stack_check_address_offset; |
169 ASSERT(Memory::uint32_at(stack_check_address_pointer) == | 169 ASSERT(Memory::uint32_at(stack_check_address_pointer) == |
170 reinterpret_cast<uint32_t>(check_code->entry())); | 170 reinterpret_cast<uint32_t>(check_code->entry())); |
171 Memory::uint32_at(stack_check_address_pointer) = | 171 Memory::uint32_at(stack_check_address_pointer) = |
172 reinterpret_cast<uint32_t>(replacement_code->entry()); | 172 reinterpret_cast<uint32_t>(replacement_code->entry()); |
173 | 173 |
174 RelocInfo rinfo(pc_after - 2 * kInstrSize, | 174 RelocInfo rinfo(pc_after - 2 * kInstrSize, |
175 RelocInfo::CODE_TARGET, | 175 RelocInfo::CODE_TARGET, |
176 NULL, | 176 0, |
177 unoptimized_code); | 177 unoptimized_code); |
178 unoptimized_code->GetHeap()->incremental_marking()->RecordWriteIntoCode( | 178 unoptimized_code->GetHeap()->incremental_marking()->RecordWriteIntoCode( |
179 unoptimized_code, &rinfo, replacement_code); | 179 unoptimized_code, &rinfo, replacement_code); |
180 } | 180 } |
181 | 181 |
182 | 182 |
183 void Deoptimizer::RevertStackCheckCodeAt(Address pc_after, | 183 void Deoptimizer::RevertStackCheckCodeAt(Address pc_after, |
184 Code* check_code, | 184 Code* check_code, |
185 Code* replacement_code) { | 185 Code* replacement_code) { |
186 const int kInstrSize = Assembler::kInstrSize; | 186 const int kInstrSize = Assembler::kInstrSize; |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 __ push(ip); | 782 __ push(ip); |
783 __ b(&done); | 783 __ b(&done); |
784 ASSERT(masm()->pc_offset() - start == table_entry_size_); | 784 ASSERT(masm()->pc_offset() - start == table_entry_size_); |
785 } | 785 } |
786 __ bind(&done); | 786 __ bind(&done); |
787 } | 787 } |
788 | 788 |
789 #undef __ | 789 #undef __ |
790 | 790 |
791 } } // namespace v8::internal | 791 } } // namespace v8::internal |
OLD | NEW |