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

Unified Diff: src/objects.cc

Issue 12593014: Use internal memcpy when initializing code objects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Jakob Kummerow's offline comments. Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/v8utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 00d00d5ee6f01c6f63160af1a79ece38f05968a9..f330a5ebbede7037b807303cae021467e79a6fa1 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -8817,15 +8817,15 @@ void Code::CopyFrom(const CodeDesc& desc) {
CHECK(relocation_info()->IsByteArray());
CHECK(reinterpret_cast<intptr_t>(instruction_start()) ==
reinterpret_cast<intptr_t>(this) + Code::kHeaderSize - kHeapObjectTag);
- memmove(instruction_start(), desc.buffer, desc.instr_size);
+ CopyBytes<byte>(instruction_start(), desc.buffer, desc.instr_size);
// copy reloc info
// TODO(mstarzinger): Remove once we found the bug.
CHECK(IsCode());
CHECK(relocation_info()->IsByteArray());
- memmove(relocation_start(),
- desc.buffer + desc.buffer_size - desc.reloc_size,
- desc.reloc_size);
+ CopyBytes<byte>(relocation_start(),
+ desc.buffer + desc.buffer_size - desc.reloc_size,
+ desc.reloc_size);
// unbox handles and relocate
intptr_t delta = instruction_start() - desc.buffer;
« no previous file with comments | « no previous file | src/v8utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698