Commit 40a9b436 authored by ishell@chromium.org's avatar ishell@chromium.org

ArrayConcat regression recover after r20312 (appeared on dromaeo benchmarks).

BUG=chromium:358561
LOG=N
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/597103003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 7e44408f
......@@ -987,12 +987,12 @@ BUILTIN(ArrayConcat) {
Handle<FixedArrayBase> storage(result_array->elements(), isolate);
ElementsAccessor* accessor = ElementsAccessor::ForKind(elements_kind);
for (int i = 0; i < n_arguments; i++) {
// TODO(ishell): It is crucial to keep |array| as a raw pointer to avoid
// performance degradation. Revisit this later.
// It is crucial to keep |array| in a raw pointer form to avoid performance
// degradation.
JSArray* array = JSArray::cast(args[i]);
int len = Smi::cast(array->length())->value();
ElementsKind from_kind = array->GetElementsKind();
if (len > 0) {
ElementsKind from_kind = array->GetElementsKind();
accessor->CopyElements(array, 0, from_kind, storage, j, len);
j += len;
}
......
This diff is collapsed.
......@@ -146,9 +146,10 @@ class ElementsAccessor {
uint32_t destination_start,
int copy_size) = 0;
// TODO(ishell): Keeping |source_holder| parameter in a non-handlified form
// helps avoiding ArrayConcat() builtin performance degradation.
// Revisit this later.
// NOTE: this method violates the handlified function signature convention:
// raw pointer parameter |source_holder| in the function that allocates.
// This is done intentionally to avoid ArrayConcat() builtin performance
// degradation.
virtual void CopyElements(
JSObject* source_holder,
uint32_t source_start,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment