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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 13932006: Replace OS::MemCopy with OS::MemMove (just as fast but more flexible). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 8 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
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 StringBuilder builder(buffer, ARRAY_SIZE(buffer)); 111 StringBuilder builder(buffer, ARRAY_SIZE(buffer));
112 va_list arguments; 112 va_list arguments;
113 va_start(arguments, format); 113 va_start(arguments, format);
114 builder.AddFormattedList(format, arguments); 114 builder.AddFormattedList(format, arguments);
115 va_end(arguments); 115 va_end(arguments);
116 116
117 // Copy the string before recording it in the assembler to avoid 117 // Copy the string before recording it in the assembler to avoid
118 // issues when the stack allocated buffer goes out of scope. 118 // issues when the stack allocated buffer goes out of scope.
119 int length = builder.position(); 119 int length = builder.position();
120 Vector<char> copy = Vector<char>::New(length + 1); 120 Vector<char> copy = Vector<char>::New(length + 1);
121 memcpy(copy.start(), builder.Finalize(), copy.length()); 121 OS::MemCopy(copy.start(), builder.Finalize(), copy.length());
122 masm()->RecordComment(copy.start()); 122 masm()->RecordComment(copy.start());
123 } 123 }
124 124
125 125
126 bool LCodeGen::GeneratePrologue() { 126 bool LCodeGen::GeneratePrologue() {
127 ASSERT(is_generating()); 127 ASSERT(is_generating());
128 128
129 if (info()->IsOptimizing()) { 129 if (info()->IsOptimizing()) {
130 ProfileEntryHookStub::MaybeCallEntryHook(masm_); 130 ProfileEntryHookStub::MaybeCallEntryHook(masm_);
131 131
(...skipping 5522 matching lines...) Expand 10 before | Expand all | Expand 10 after
5654 FixedArray::kHeaderSize - kPointerSize)); 5654 FixedArray::kHeaderSize - kPointerSize));
5655 __ bind(&done); 5655 __ bind(&done);
5656 } 5656 }
5657 5657
5658 5658
5659 #undef __ 5659 #undef __
5660 5660
5661 } } // namespace v8::internal 5661 } } // namespace v8::internal
5662 5662
5663 #endif // V8_TARGET_ARCH_X64 5663 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698