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

Side by Side Diff: test/mjsunit/compiler/load-elimination.js

Issue 143413019: Load elimination fix with a test case. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review notes applied Created 6 years, 10 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 | « src/hydrogen-load-elimination.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 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 function test_transitioning_store2() { 77 function test_transitioning_store2() {
78 var b = new C(); 78 var b = new C();
79 var a = new B(-1, 5); 79 var a = new B(-1, 5);
80 var f = a.x, g = a.y; 80 var f = a.x, g = a.y;
81 b.x = 9; 81 b.x = 9;
82 b.y = 11; 82 b.y = 11;
83 return a.x + a.y; 83 return a.x + a.y;
84 } 84 }
85 85
86 var false_v = false;
87 function test_transitioning_store3() {
88 var o = new C();
89 var v = o;
90 if (false_v) v = 0;
91 v.x = 20;
92 return o.x;
93 }
94
86 function killall() { 95 function killall() {
87 try { } catch(e) { } 96 try { } catch(e) { }
88 } 97 }
89 98
90 %NeverOptimizeFunction(killall); 99 %NeverOptimizeFunction(killall);
91 100
92 function test_store_load_kill() { 101 function test_store_load_kill() {
93 var a = new B(1, 2); 102 var a = new B(1, 2);
94 a.x = 4; 103 a.x = 4;
95 var f = a.x; 104 var f = a.x;
(...skipping 20 matching lines...) Expand all
116 assertEquals(x, f()); 125 assertEquals(x, f());
117 %OptimizeFunctionOnNextCall(f); 126 %OptimizeFunctionOnNextCall(f);
118 assertEquals(x, f()); 127 assertEquals(x, f());
119 } 128 }
120 129
121 test(4, test_load); 130 test(4, test_load);
122 test(22, test_store_load); 131 test(22, test_store_load);
123 test(8, test_nonaliasing_store1); 132 test(8, test_nonaliasing_store1);
124 test(5, test_transitioning_store1); 133 test(5, test_transitioning_store1);
125 test(4, test_transitioning_store2); 134 test(4, test_transitioning_store2);
135 test(20, test_transitioning_store3);
126 test(22, test_store_load_kill); 136 test(22, test_store_load_kill);
127 test(7, test_store_store); 137 test(7, test_store_store);
OLDNEW
« no previous file with comments | « src/hydrogen-load-elimination.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698