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

Side by Side Diff: src/elements.cc

Issue 11280223: CopyPackedSmiToDoubleElements should fill the FixedDoubleArray with holes (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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 | « no previous file | test/mjsunit/regress/regress-2433.js » ('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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 uint32_t from_start, 367 uint32_t from_start,
368 FixedDoubleArray* to, 368 FixedDoubleArray* to,
369 uint32_t to_start, 369 uint32_t to_start,
370 int packed_size, 370 int packed_size,
371 int raw_copy_size) { 371 int raw_copy_size) {
372 int copy_size = raw_copy_size; 372 int copy_size = raw_copy_size;
373 uint32_t to_end; 373 uint32_t to_end;
374 if (raw_copy_size < 0) { 374 if (raw_copy_size < 0) {
375 ASSERT(raw_copy_size == ElementsAccessor::kCopyToEnd || 375 ASSERT(raw_copy_size == ElementsAccessor::kCopyToEnd ||
376 raw_copy_size == ElementsAccessor::kCopyToEndAndInitializeToHole); 376 raw_copy_size == ElementsAccessor::kCopyToEndAndInitializeToHole);
377 copy_size = from->length() - from_start; 377 copy_size = packed_size - from_start;
378 if (raw_copy_size == ElementsAccessor::kCopyToEndAndInitializeToHole) { 378 if (raw_copy_size == ElementsAccessor::kCopyToEndAndInitializeToHole) {
379 to_end = to->length(); 379 to_end = to->length();
380 for (uint32_t i = to_start + copy_size; i < to_end; ++i) { 380 for (uint32_t i = to_start + copy_size; i < to_end; ++i) {
381 to->set_the_hole(i); 381 to->set_the_hole(i);
382 } 382 }
383 } else { 383 } else {
384 to_end = to_start + static_cast<uint32_t>(copy_size); 384 to_end = to_start + static_cast<uint32_t>(copy_size);
385 } 385 }
386 } else { 386 } else {
387 to_end = to_start + static_cast<uint32_t>(copy_size); 387 to_end = to_start + static_cast<uint32_t>(copy_size);
(...skipping 1472 matching lines...) Expand 10 before | Expand all | Expand 10 after
1860 if (!maybe_obj->To(&new_backing_store)) return maybe_obj; 1860 if (!maybe_obj->To(&new_backing_store)) return maybe_obj;
1861 new_backing_store->set(0, length); 1861 new_backing_store->set(0, length);
1862 { MaybeObject* result = array->SetContent(new_backing_store); 1862 { MaybeObject* result = array->SetContent(new_backing_store);
1863 if (result->IsFailure()) return result; 1863 if (result->IsFailure()) return result;
1864 } 1864 }
1865 return array; 1865 return array;
1866 } 1866 }
1867 1867
1868 1868
1869 } } // namespace v8::internal 1869 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-2433.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698