 Chromium Code Reviews
 Chromium Code Reviews Issue 11377132:
  Support all fast elements kinds in the major array operations.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
    
  
    Issue 11377132:
  Support all fast elements kinds in the major array operations.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge| Index: src/elements.cc | 
| diff --git a/src/elements.cc b/src/elements.cc | 
| index 8cb48c6ad8a418e3640b82d2d796b191eddc9a7a..4bc22248fc8a674dd3fea354750089883f18bc48 100644 | 
| --- a/src/elements.cc | 
| +++ b/src/elements.cc | 
| @@ -146,6 +146,23 @@ static Failure* ThrowArrayLengthRangeError(Heap* heap) { | 
| } | 
| +void CopySmiToSmiElements(FixedArray* from, | 
| + uint32_t from_start, | 
| + FixedArray* to, | 
| + uint32_t to_start, | 
| + int copy_size) { | 
| + ASSERT(to->map() != HEAP->fixed_cow_array_map()); | 
| + ASSERT((copy_size + static_cast<int>(to_start)) <= to->length() && | 
| + (copy_size + static_cast<int>(from_start)) <= from->length()); | 
| 
danno
2012/11/13 22:05:12
Please handle the hole here and handle the Element
 
Toon Verwaest
2012/11/14 11:53:13
Removed this function again now that I just use ac
 | 
| + if (copy_size == 0) return; | 
| + Address to_address = to->address() + FixedArray::kHeaderSize; | 
| + Address from_address = from->address() + FixedArray::kHeaderSize; | 
| + CopyWords(reinterpret_cast<Object**>(to_address) + to_start, | 
| + reinterpret_cast<Object**>(from_address) + from_start, | 
| + copy_size); | 
| +} | 
| + | 
| + | 
| void CopyObjectToObjectElements(FixedArray* from, | 
| ElementsKind from_kind, | 
| uint32_t from_start, | 
| @@ -243,7 +260,7 @@ static void CopyDictionaryToObjectElements(SeededNumberDictionary* from, | 
| } | 
| -MUST_USE_RESULT static MaybeObject* CopyDoubleToObjectElements( | 
| +MUST_USE_RESULT MaybeObject* CopyDoubleToObjectElements( | 
| FixedDoubleArray* from, | 
| uint32_t from_start, | 
| FixedArray* to, | 
| @@ -298,7 +315,7 @@ MUST_USE_RESULT static MaybeObject* CopyDoubleToObjectElements( | 
| } | 
| -static void CopyDoubleToDoubleElements(FixedDoubleArray* from, | 
| +void CopyDoubleToDoubleElements(FixedDoubleArray* from, | 
| uint32_t from_start, | 
| FixedDoubleArray* to, | 
| uint32_t to_start, | 
| @@ -329,11 +346,11 @@ static void CopyDoubleToDoubleElements(FixedDoubleArray* from, | 
| } | 
| -static void CopySmiToDoubleElements(FixedArray* from, | 
| - uint32_t from_start, | 
| - FixedDoubleArray* to, | 
| - uint32_t to_start, | 
| - int raw_copy_size) { | 
| +void CopySmiToDoubleElements(FixedArray* from, | 
| + uint32_t from_start, | 
| + FixedDoubleArray* to, | 
| + uint32_t to_start, | 
| + int raw_copy_size) { | 
| int copy_size = raw_copy_size; | 
| if (raw_copy_size < 0) { | 
| ASSERT(raw_copy_size == ElementsAccessor::kCopyToEnd || |