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 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1869 | 1869 |
1870 // Clear the buffer in debug mode. Use 'int3' instructions to make | 1870 // Clear the buffer in debug mode. Use 'int3' instructions to make |
1871 // sure to get into problems if we ever run uninitialized code. | 1871 // sure to get into problems if we ever run uninitialized code. |
1872 #ifdef DEBUG | 1872 #ifdef DEBUG |
1873 memset(desc.buffer, 0xCC, desc.buffer_size); | 1873 memset(desc.buffer, 0xCC, desc.buffer_size); |
1874 #endif | 1874 #endif |
1875 | 1875 |
1876 // Copy the data. | 1876 // Copy the data. |
1877 int pc_delta = desc.buffer - buffer_; | 1877 int pc_delta = desc.buffer - buffer_; |
1878 int rc_delta = (desc.buffer + desc.buffer_size) - (buffer_ + buffer_size_); | 1878 int rc_delta = (desc.buffer + desc.buffer_size) - (buffer_ + buffer_size_); |
1879 MemMove(desc.buffer, buffer_, desc.instr_size); | 1879 OS::MemMove(desc.buffer, buffer_, desc.instr_size); |
1880 MemMove(rc_delta + reloc_info_writer.pos(), reloc_info_writer.pos(), | 1880 OS::MemMove(rc_delta + reloc_info_writer.pos(), |
1881 desc.reloc_size); | 1881 reloc_info_writer.pos(), desc.reloc_size); |
1882 | 1882 |
1883 // Switch buffers. | 1883 // Switch buffers. |
1884 if (isolate()->assembler_spare_buffer() == NULL && | 1884 if (isolate()->assembler_spare_buffer() == NULL && |
1885 buffer_size_ == kMinimalBufferSize) { | 1885 buffer_size_ == kMinimalBufferSize) { |
1886 isolate()->set_assembler_spare_buffer(buffer_); | 1886 isolate()->set_assembler_spare_buffer(buffer_); |
1887 } else { | 1887 } else { |
1888 DeleteArray(buffer_); | 1888 DeleteArray(buffer_); |
1889 } | 1889 } |
1890 buffer_ = desc.buffer; | 1890 buffer_ = desc.buffer; |
1891 buffer_size_ = desc.buffer_size; | 1891 buffer_size_ = desc.buffer_size; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2023 fprintf(coverage_log, "%s\n", file_line); | 2023 fprintf(coverage_log, "%s\n", file_line); |
2024 fflush(coverage_log); | 2024 fflush(coverage_log); |
2025 } | 2025 } |
2026 } | 2026 } |
2027 | 2027 |
2028 #endif | 2028 #endif |
2029 | 2029 |
2030 } } // namespace v8::internal | 2030 } } // namespace v8::internal |
2031 | 2031 |
2032 #endif // V8_TARGET_ARCH_X87 | 2032 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |