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

Unified Diff: test/mjsunit/regress/regress-2156.js

Issue 10539131: Fix performance regression caused by r11202. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added regression test. Created 8 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-2156.js
diff --git a/src/platform-posix.h b/test/mjsunit/regress/regress-2156.js
similarity index 81%
copy from src/platform-posix.h
copy to test/mjsunit/regress/regress-2156.js
index 7a982ed2ef3080dad77860d6f46b356a9067bf3b..348257113062b568770a072d86ed52b3e854d384 100644
--- a/src/platform-posix.h
+++ b/test/mjsunit/regress/regress-2156.js
@@ -25,15 +25,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef V8_PLATFORM_POSIX_H_
-#define V8_PLATFORM_POSIX_H_
+// Flags: --allow-natives-syntax --harmony-collections
-namespace v8 {
-namespace internal {
+var key1 = {};
+var key2 = {};
+var map = new WeakMap;
-// Used by platform implementation files during OS::PostSetUp().
-void POSIXPostSetUp();
-
-} } // namespace v8::internal
-
-#endif // V8_PLATFORM_POSIX_H_
+// Adding hidden properties preserves map sharing. Putting the key into
+// a WeakMap will cause the first hidden property to be added.
+assertTrue(%HaveSameMap(key1, key2));
+map.set(key1, 1);
+map.set(key2, 2);
+assertTrue(%HaveSameMap(key1, key2));
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698