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

Side by Side Diff: test/mjsunit/fast-prototype.js

Issue 2525573002: [runtime] Always normalize prototype maps that aren't marked as 'should be fast' yet (Closed)
Patch Set: minor cleanup Created 4 years 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/objects.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
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 var set__proto__ = ((i & 1) != 0); 94 var set__proto__ = ((i & 1) != 0);
95 var use_new = ((i & 2) != 0); 95 var use_new = ((i & 2) != 0);
96 96
97 test(use_new, true, set__proto__); 97 test(use_new, true, set__proto__);
98 test(use_new, false, set__proto__); 98 test(use_new, false, set__proto__);
99 } 99 }
100 100
101 101
102 var x = {a: 1, b: 2, c: 3}; 102 var x = {a: 1, b: 2, c: 3};
103 var o = { __proto__: x }; 103 var o = { __proto__: x };
104 assertTrue(%HasFastProperties(x)); 104 assertFalse(%HasFastProperties(x));
105 for (key in x) { 105 for (key in x) {
106 assertTrue(key == 'a'); 106 assertTrue(key == 'a');
107 break; 107 break;
108 } 108 }
109 assertTrue(%HasFastProperties(x));
109 delete x.b; 110 delete x.b;
110 for (key in x) { 111 for (key in x) {
111 assertTrue(key == 'a'); 112 assertTrue(key == 'a');
112 break; 113 break;
113 } 114 }
114 assertTrue(%HasFastProperties(x)); 115 assertTrue(%HasFastProperties(x));
115 x.d = 4; 116 x.d = 4;
116 assertTrue(%HasFastProperties(x)); 117 assertTrue(%HasFastProperties(x));
117 for (key in x) { 118 for (key in x) {
118 assertTrue(key == 'a'); 119 assertTrue(key == 'a');
119 break; 120 break;
120 } 121 }
OLDNEW
« 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