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

Unified Diff: test/mjsunit/fast-prototype.js

Issue 2036493006: Keep prototype maps in dictionary mode until ICs see them (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: make ignition tests happy Created 4 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 | « test/mjsunit/dictionary-properties.js ('k') | test/mjsunit/regress/regress-put-prototype-transition.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/fast-prototype.js
diff --git a/test/mjsunit/fast-prototype.js b/test/mjsunit/fast-prototype.js
index 7432ecce9d7d6fee67f7a903208c15f381ab88db..aa0a62e954e4fadbc6b83cb06af0d8a8f232027b 100644
--- a/test/mjsunit/fast-prototype.js
+++ b/test/mjsunit/fast-prototype.js
@@ -46,14 +46,20 @@ function AddProps(obj) {
function DoProtoMagic(proto, set__proto__) {
+ var receiver;
if (set__proto__) {
- (new Sub()).__proto__ = proto;
+ receiver = new Sub();
+ receiver.__proto__ = proto;
} else {
Sub.prototype = proto;
// Need to instantiate Sub to mark .prototype as prototype. Make sure the
// instantiated object is used so that the allocation is not optimized away.
- %DebugPrint(new Sub());
+ receiver = new Sub();
}
+ // Prototypes are made fast when ICs encounter them.
+ function ic() { return typeof receiver.foo; }
+ ic();
+ ic();
}
« no previous file with comments | « test/mjsunit/dictionary-properties.js ('k') | test/mjsunit/regress/regress-put-prototype-transition.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698