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

Side by Side Diff: test/mjsunit/regress/regress-crbug-626715.js

Issue 2135253002: [runtime] Follow-up fix for "Better encapsulation of dictionary objects handling in lookup iterator… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Test added Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « src/lookup.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Create a prototype object which has a lot of fast properties.
6 var body = "";
7 for (var i = 0; i < 100; i++) {
8 body += `this.a${i} = 0;\n`;
9 }
10 var Proto = new Function(body);
11
12 function A() {}
13 A.prototype = new Proto();
14
15 // Create a object and add properties that already exist in the prototype.
16 // At some point the object will turn into a dictionary mode and one of
17 // the fast details from the prototype will be reinterpreted as a details
18 // for a new property ...
19 var o = new A();
20 for (var i = 0; i < 100; i++) {
21 o["a" + i] = i;
22 }
23
24 // ... which will break the enumeration order of the slow properties.
25 var names = Object.getOwnPropertyNames(o);
26 for (var i = 0; i < 100; i++) {
27 assertEquals("a" + i, names[i]);
28 }
OLDNEW
« no previous file with comments | « src/lookup.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698