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

Side by Side Diff: src/mips/lithium-codegen-mips.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/mips/assembler-mips.cc ('k') | src/mips/simulator-mips.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 StringBuilder builder(buffer, ARRAY_SIZE(buffer)); 106 StringBuilder builder(buffer, ARRAY_SIZE(buffer));
107 va_list arguments; 107 va_list arguments;
108 va_start(arguments, format); 108 va_start(arguments, format);
109 builder.AddFormattedList(format, arguments); 109 builder.AddFormattedList(format, arguments);
110 va_end(arguments); 110 va_end(arguments);
111 111
112 // Copy the string before recording it in the assembler to avoid 112 // Copy the string before recording it in the assembler to avoid
113 // issues when the stack allocated buffer goes out of scope. 113 // issues when the stack allocated buffer goes out of scope.
114 size_t length = builder.position(); 114 size_t length = builder.position();
115 Vector<char> copy = Vector<char>::New(length + 1); 115 Vector<char> copy = Vector<char>::New(length + 1);
116 memcpy(copy.start(), builder.Finalize(), copy.length()); 116 OS::MemCopy(copy.start(), builder.Finalize(), copy.length());
117 masm()->RecordComment(copy.start()); 117 masm()->RecordComment(copy.start());
118 } 118 }
119 119
120 120
121 bool LCodeGen::GeneratePrologue() { 121 bool LCodeGen::GeneratePrologue() {
122 ASSERT(is_generating()); 122 ASSERT(is_generating());
123 123
124 if (info()->IsOptimizing()) { 124 if (info()->IsOptimizing()) {
125 ProfileEntryHookStub::MaybeCallEntryHook(masm_); 125 ProfileEntryHookStub::MaybeCallEntryHook(masm_);
126 126
(...skipping 5773 matching lines...) Expand 10 before | Expand all | Expand 10 after
5900 __ Subu(scratch, result, scratch); 5900 __ Subu(scratch, result, scratch);
5901 __ lw(result, FieldMemOperand(scratch, 5901 __ lw(result, FieldMemOperand(scratch,
5902 FixedArray::kHeaderSize - kPointerSize)); 5902 FixedArray::kHeaderSize - kPointerSize));
5903 __ bind(&done); 5903 __ bind(&done);
5904 } 5904 }
5905 5905
5906 5906
5907 #undef __ 5907 #undef __
5908 5908
5909 } } // namespace v8::internal 5909 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | src/mips/simulator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698