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

Unified Diff: test/mjsunit/compiler/osr-nested.js

Issue 16381006: Change PC for OSR entries to point to something more sensible (i.e. the first UnknownOsrValue), rem… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add --always-osr flag. Created 7 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/compiler/osr-big.js ('k') | test/mjsunit/compiler/osr-one.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/osr-nested.js
diff --git a/test/mjsunit/regress/regress-2499.js b/test/mjsunit/compiler/osr-nested.js
similarity index 84%
copy from test/mjsunit/regress/regress-2499.js
copy to test/mjsunit/compiler/osr-nested.js
index 52aad874db6fcdc89f5ee1ae4db45304e64b0e77..4bdb0828ca2272332701c579bcbf9952cf43e6a4 100644
--- a/test/mjsunit/regress/regress-2499.js
+++ b/test/mjsunit/compiler/osr-nested.js
@@ -25,16 +25,22 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax
+// Flags: --use-osr
-function foo(word, nBits) {
- return (word[1] >>> nBits) | (word[0] << (32 - nBits));
+function f() {
+ var sum = 0;
+ for (var i = 0; i < 10; i++) {
+ for (var j = 0; j < 100000; j++) {
+ var x = i + 2;
+ var y = x + 5;
+ var z = y + 3;
+ sum += z;
+ }
+ }
+ return sum;
}
-word = [0x1001, 0];
-var expected = foo(word, 1);
-foo(word, 1);
-%OptimizeFunctionOnNextCall(foo);
-var optimized = foo(word, 1);
-assertEquals(expected, optimized)
+assertEquals(14500000, f());
+assertEquals(14500000, f());
+assertEquals(14500000, f());
« no previous file with comments | « test/mjsunit/compiler/osr-big.js ('k') | test/mjsunit/compiler/osr-one.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698