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

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

Issue 15012016: small misspelling fixes. (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « test/mjsunit/arguments-load-across-eval.js ('k') | test/mjsunit/unicode-test.js » ('j') | 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 21 matching lines...) Expand all
32 o.x = true; 32 o.x = true;
33 delete o.x; // slow case object 33 delete o.x; // slow case object
34 34
35 var u = { x: 0, f: function () { return "u"; } }; // object with some other map 35 var u = { x: 0, f: function () { return "u"; } }; // object with some other map
36 36
37 function F(x) { 37 function F(x) {
38 return x.f(); 38 return x.f();
39 } 39 }
40 40
41 // First make CALL IC in F go MEGAMORPHIC and ensure that we put the stub 41 // First make CALL IC in F go MEGAMORPHIC and ensure that we put the stub
42 // that calls p.f (guarded by a negative dictionary lookup on the reciever) 42 // that calls p.f (guarded by a negative dictionary lookup on the receiver)
43 // into the stub cache 43 // into the stub cache
44 assertEquals("p", F(o)); 44 assertEquals("p", F(o));
45 assertEquals("p", F(o)); 45 assertEquals("p", F(o));
46 assertEquals("u", F(u)); 46 assertEquals("u", F(u));
47 assertEquals("p", F(o)); 47 assertEquals("p", F(o));
48 assertEquals("u", F(u)); 48 assertEquals("u", F(u));
49 49
50 // Optimize F. We will inline p.f into F guarded by map checked against 50 // Optimize F. We will inline p.f into F guarded by map checked against
51 // receiver which does not work for slow case objects. 51 // receiver which does not work for slow case objects.
52 %OptimizeFunctionOnNextCall(F); 52 %OptimizeFunctionOnNextCall(F);
53 assertEquals("p", F(o)); 53 assertEquals("p", F(o));
54 54
55 // Add f to o. o's map will *not* change. 55 // Add f to o. o's map will *not* change.
56 o.f = function () { return "o"; }; 56 o.f = function () { return "o"; };
57 assertEquals("o", F(o)); 57 assertEquals("o", F(o));
OLDNEW
« no previous file with comments | « test/mjsunit/arguments-load-across-eval.js ('k') | test/mjsunit/unicode-test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698