Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: src/x87/assembler-x87.cc

Issue 446923002: Get rid of the "spare buffer" cache. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« src/arm64/assembler-arm64.cc ('K') | « src/x64/assembler-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after
1903 memset(desc.buffer, 0xCC, desc.buffer_size); 1903 memset(desc.buffer, 0xCC, desc.buffer_size);
1904 #endif 1904 #endif
1905 1905
1906 // Copy the data. 1906 // Copy the data.
1907 int pc_delta = desc.buffer - buffer_; 1907 int pc_delta = desc.buffer - buffer_;
1908 int rc_delta = (desc.buffer + desc.buffer_size) - (buffer_ + buffer_size_); 1908 int rc_delta = (desc.buffer + desc.buffer_size) - (buffer_ + buffer_size_);
1909 MemMove(desc.buffer, buffer_, desc.instr_size); 1909 MemMove(desc.buffer, buffer_, desc.instr_size);
1910 MemMove(rc_delta + reloc_info_writer.pos(), reloc_info_writer.pos(), 1910 MemMove(rc_delta + reloc_info_writer.pos(), reloc_info_writer.pos(),
1911 desc.reloc_size); 1911 desc.reloc_size);
1912 1912
1913 // Switch buffers. 1913 DeleteArray(buffer_);
1914 if (isolate()->assembler_spare_buffer() == NULL &&
1915 buffer_size_ == kMinimalBufferSize) {
1916 isolate()->set_assembler_spare_buffer(buffer_);
1917 } else {
1918 DeleteArray(buffer_);
1919 }
1920 buffer_ = desc.buffer; 1914 buffer_ = desc.buffer;
1921 buffer_size_ = desc.buffer_size; 1915 buffer_size_ = desc.buffer_size;
1922 pc_ += pc_delta; 1916 pc_ += pc_delta;
1923 reloc_info_writer.Reposition(reloc_info_writer.pos() + rc_delta, 1917 reloc_info_writer.Reposition(reloc_info_writer.pos() + rc_delta,
1924 reloc_info_writer.last_pc() + pc_delta); 1918 reloc_info_writer.last_pc() + pc_delta);
1925 1919
1926 // Relocate runtime entries. 1920 // Relocate runtime entries.
1927 for (RelocIterator it(desc); !it.done(); it.next()) { 1921 for (RelocIterator it(desc); !it.done(); it.next()) {
1928 RelocInfo::Mode rmode = it.rinfo()->rmode(); 1922 RelocInfo::Mode rmode = it.rinfo()->rmode();
1929 if (rmode == RelocInfo::INTERNAL_REFERENCE) { 1923 if (rmode == RelocInfo::INTERNAL_REFERENCE) {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
2053 fprintf(coverage_log, "%s\n", file_line); 2047 fprintf(coverage_log, "%s\n", file_line);
2054 fflush(coverage_log); 2048 fflush(coverage_log);
2055 } 2049 }
2056 } 2050 }
2057 2051
2058 #endif 2052 #endif
2059 2053
2060 } } // namespace v8::internal 2054 } } // namespace v8::internal
2061 2055
2062 #endif // V8_TARGET_ARCH_X87 2056 #endif // V8_TARGET_ARCH_X87
OLDNEW
« src/arm64/assembler-arm64.cc ('K') | « src/x64/assembler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698