OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
6 // are met: | 6 // are met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 | 326 |
327 #ifdef GENERATED_CODE_COVERAGE | 327 #ifdef GENERATED_CODE_COVERAGE |
328 InitCoverageLog(); | 328 InitCoverageLog(); |
329 #endif | 329 #endif |
330 } | 330 } |
331 | 331 |
332 | 332 |
333 void Assembler::GetCode(CodeDesc* desc) { | 333 void Assembler::GetCode(CodeDesc* desc) { |
334 // Finalize code (at this point overflow() may be true, but the gap ensures | 334 // Finalize code (at this point overflow() may be true, but the gap ensures |
335 // that we are still not overlapping instructions and relocation info). | 335 // that we are still not overlapping instructions and relocation info). |
| 336 reloc_info_writer.Finish(); |
336 DCHECK(pc_ <= reloc_info_writer.pos()); // No overlap. | 337 DCHECK(pc_ <= reloc_info_writer.pos()); // No overlap. |
337 // Set up code descriptor. | 338 // Set up code descriptor. |
338 desc->buffer = buffer_; | 339 desc->buffer = buffer_; |
339 desc->buffer_size = buffer_size_; | 340 desc->buffer_size = buffer_size_; |
340 desc->instr_size = pc_offset(); | 341 desc->instr_size = pc_offset(); |
341 desc->reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos(); | 342 desc->reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos(); |
342 desc->origin = this; | 343 desc->origin = this; |
343 } | 344 } |
344 | 345 |
345 | 346 |
(...skipping 2500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2846 fprintf(coverage_log, "%s\n", file_line); | 2847 fprintf(coverage_log, "%s\n", file_line); |
2847 fflush(coverage_log); | 2848 fflush(coverage_log); |
2848 } | 2849 } |
2849 } | 2850 } |
2850 | 2851 |
2851 #endif | 2852 #endif |
2852 | 2853 |
2853 } } // namespace v8::internal | 2854 } } // namespace v8::internal |
2854 | 2855 |
2855 #endif // V8_TARGET_ARCH_IA32 | 2856 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |