Merge r3536 and r3538 to trunk to fix performance issue with
hash tables.
Review URL: http://codereview.chromium.org/525025
git-svn-id: http://v8.googlecode.com/svn/trunk@3539 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/runtime.cc b/src/runtime.cc
index 8349833..c62f8fd 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -5409,6 +5409,8 @@
index_offset_ += delta;
}
+ Handle<FixedArray> storage() { return storage_; }
+
private:
Handle<FixedArray> storage_;
uint32_t index_limit_;
@@ -5718,7 +5720,8 @@
IterateArguments(arguments, &visitor);
result->set_length(*len);
- result->set_elements(*storage);
+ // Please note the storage might have changed in the visitor.
+ result->set_elements(*visitor.storage());
return *result;
}