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

Side by Side Diff: src/builtins.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/atomicops_internals_x86_gcc.cc ('k') | src/conversions-inl.h » ('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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 isolate->context()->native_context()->array_function()); 324 isolate->context()->native_context()->array_function());
325 } 325 }
326 326
327 327
328 static void MoveDoubleElements(FixedDoubleArray* dst, 328 static void MoveDoubleElements(FixedDoubleArray* dst,
329 int dst_index, 329 int dst_index,
330 FixedDoubleArray* src, 330 FixedDoubleArray* src,
331 int src_index, 331 int src_index,
332 int len) { 332 int len) {
333 if (len == 0) return; 333 if (len == 0) return;
334 memmove(dst->data_start() + dst_index, 334 OS::MemMove(dst->data_start() + dst_index,
335 src->data_start() + src_index, 335 src->data_start() + src_index,
336 len * kDoubleSize); 336 len * kDoubleSize);
337 } 337 }
338 338
339 339
340 static void FillWithHoles(Heap* heap, FixedArray* dst, int from, int to) { 340 static void FillWithHoles(Heap* heap, FixedArray* dst, int from, int to) {
341 ASSERT(dst->map() != heap->fixed_cow_array_map()); 341 ASSERT(dst->map() != heap->fixed_cow_array_map());
342 MemsetPointer(dst->data_start() + from, heap->the_hole_value(), to - from); 342 MemsetPointer(dst->data_start() + from, heap->the_hole_value(), to - from);
343 } 343 }
344 344
345 345
346 static void FillWithHoles(FixedDoubleArray* dst, int from, int to) { 346 static void FillWithHoles(FixedDoubleArray* dst, int from, int to) {
(...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after
1875 return Handle<Code>(code_address); \ 1875 return Handle<Code>(code_address); \
1876 } 1876 }
1877 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) 1877 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C)
1878 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) 1878 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A)
1879 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 1879 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
1880 #undef DEFINE_BUILTIN_ACCESSOR_C 1880 #undef DEFINE_BUILTIN_ACCESSOR_C
1881 #undef DEFINE_BUILTIN_ACCESSOR_A 1881 #undef DEFINE_BUILTIN_ACCESSOR_A
1882 1882
1883 1883
1884 } } // namespace v8::internal 1884 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/atomicops_internals_x86_gcc.cc ('k') | src/conversions-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698