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

Side by Side Diff: test/mjsunit/regress/regress-252797.js

Issue 2840583002: Reland of [builtins] DeleteProperty: Handle last-added fast properties (Closed)
Patch Set: fix: use OnePointerFiller Created 3 years, 8 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 | « test/mjsunit/dictionary-properties.js ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 27 matching lines...) Expand all
38 38
39 // We assume dict usage for null prototype. 39 // We assume dict usage for null prototype.
40 var holder = Object.create(null, { 40 var holder = Object.create(null, {
41 holderMethod: {value: function() {}} 41 holderMethod: {value: function() {}}
42 }); 42 });
43 assertFalse(%HasFastProperties(holder)); 43 assertFalse(%HasFastProperties(holder));
44 44
45 // Create a receiver into dictionary mode. 45 // Create a receiver into dictionary mode.
46 var receiver = Object.create(holder, { 46 var receiver = Object.create(holder, {
47 killMe: {value: 0, configurable: true}, 47 killMe: {value: 0, configurable: true},
48 keepMe: {value: 0, configurable: true}
48 }); 49 });
49 delete receiver.killMe; 50 delete receiver.killMe;
50 assertFalse(%HasFastProperties(receiver)); 51 assertFalse(%HasFastProperties(receiver));
51 52
52 // The actual function to test, triggering the retrieval of the wrong map. 53 // The actual function to test, triggering the retrieval of the wrong map.
53 function callConstantFunctionOnPrototype(obj) { 54 function callConstantFunctionOnPrototype(obj) {
54 obj.holderMethod(); 55 obj.holderMethod();
55 } 56 }
56 57
57 callConstantFunctionOnPrototype(receiver); 58 callConstantFunctionOnPrototype(receiver);
58 callConstantFunctionOnPrototype(receiver); 59 callConstantFunctionOnPrototype(receiver);
59 %OptimizeFunctionOnNextCall(callConstantFunctionOnPrototype); 60 %OptimizeFunctionOnNextCall(callConstantFunctionOnPrototype);
60 callConstantFunctionOnPrototype(receiver); 61 callConstantFunctionOnPrototype(receiver);
61 62
62 // Make sure that the function is still optimized. 63 // Make sure that the function is still optimized.
63 assertOptimized(callConstantFunctionOnPrototype); 64 assertOptimized(callConstantFunctionOnPrototype);
OLDNEW
« no previous file with comments | « test/mjsunit/dictionary-properties.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698