 Chromium Code Reviews
 Chromium Code Reviews Issue 11416238:
  Move CopyElements to the accessor of the target.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
    
  
    Issue 11416238:
  Move CopyElements to the accessor of the target.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge| Index: src/builtins.cc | 
| diff --git a/src/builtins.cc b/src/builtins.cc | 
| index d9f8d15411ad91be9dd141cfe9d4534eeb9782ea..fb5fd1b706dd2906884e20a5a4484249a517a468 100644 | 
| --- a/src/builtins.cc | 
| +++ b/src/builtins.cc | 
| @@ -1220,13 +1220,14 @@ BUILTIN(ArrayConcat) { | 
| int j = 0; | 
| FixedArrayBase* storage = result_array->elements(); | 
| + ElementsAccessor* accessor = ElementsAccessor::ForKind(elements_kind); | 
| for (int i = 0; i < n_arguments; i++) { | 
| JSArray* array = JSArray::cast(args[i]); | 
| int len = Smi::cast(array->length())->value(); | 
| + ElementsKind origin_kind = array->GetElementsKind(); | 
| 
Michael Starzinger
2012/11/29 09:39:32
Use "from_kind" as name for consistency.
 
Toon Verwaest
2012/11/29 14:04:40
Done.
 | 
| if (len > 0) { | 
| - ElementsAccessor* accessor = array->GetElementsAccessor(); | 
| MaybeObject* maybe_failure = | 
| - accessor->CopyElements(array, 0, storage, elements_kind, j, len); | 
| + accessor->CopyElements(array, 0, storage, origin_kind, j, len); | 
| if (maybe_failure->IsFailure()) return maybe_failure; | 
| j += len; | 
| } |