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

Side by Side Diff: test/cctest/test-deoptimization.cc

Issue 137863005: Revert "Use stability to only conditionally flush information from the CheckMaps table." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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-instructions.cc ('k') | test/mjsunit/regress/regress-map-invalidation-2.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 531
532 CHECK(!GetJSFunction(env->Global(), "f")->IsOptimized()); 532 CHECK(!GetJSFunction(env->Global(), "f")->IsOptimized());
533 CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value()); 533 CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value());
534 CHECK_EQ(true, env->Global()->Get(v8_str("result"))->BooleanValue()); 534 CHECK_EQ(true, env->Global()->Get(v8_str("result"))->BooleanValue());
535 CHECK_EQ(0, Deoptimizer::GetDeoptimizedCodeCount(CcTest::i_isolate())); 535 CHECK_EQ(0, Deoptimizer::GetDeoptimizedCodeCount(CcTest::i_isolate()));
536 } 536 }
537 537
538 538
539 TEST(DeoptimizeLoadICStoreIC) { 539 TEST(DeoptimizeLoadICStoreIC) {
540 i::FLAG_concurrent_recompilation = false; 540 i::FLAG_concurrent_recompilation = false;
541 i::FLAG_check_elimination = false;
542 LocalContext env; 541 LocalContext env;
543 v8::HandleScope scope(env->GetIsolate()); 542 v8::HandleScope scope(env->GetIsolate());
544 543
545 // Functions to generate load/store/keyed load/keyed store IC calls. 544 // Functions to generate load/store/keyed load/keyed store IC calls.
546 const char* f1_source = "function f1(x) { return x.y; };"; 545 const char* f1_source = "function f1(x) { return x.y; };";
547 const char* g1_source = "function g1(x) { x.y = 1; };"; 546 const char* g1_source = "function g1(x) { x.y = 1; };";
548 const char* f2_source = "function f2(x, y) { return x[y]; };"; 547 const char* f2_source = "function f2(x, y) { return x[y]; };";
549 const char* g2_source = "function g2(x, y) { x[y] = 1; };"; 548 const char* g2_source = "function g2(x, y) { x[y] = 1; };";
550 549
551 { 550 {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized()); 612 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized());
614 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized()); 613 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized());
615 CHECK_EQ(4, env->Global()->Get(v8_str("count"))->Int32Value()); 614 CHECK_EQ(4, env->Global()->Get(v8_str("count"))->Int32Value());
616 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value()); 615 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value());
617 CHECK_EQ(0, Deoptimizer::GetDeoptimizedCodeCount(CcTest::i_isolate())); 616 CHECK_EQ(0, Deoptimizer::GetDeoptimizedCodeCount(CcTest::i_isolate()));
618 } 617 }
619 618
620 619
621 TEST(DeoptimizeLoadICStoreICNested) { 620 TEST(DeoptimizeLoadICStoreICNested) {
622 i::FLAG_concurrent_recompilation = false; 621 i::FLAG_concurrent_recompilation = false;
623 i::FLAG_check_elimination = false;
624 LocalContext env; 622 LocalContext env;
625 v8::HandleScope scope(env->GetIsolate()); 623 v8::HandleScope scope(env->GetIsolate());
626 624
627 // Functions to generate load/store/keyed load/keyed store IC calls. 625 // Functions to generate load/store/keyed load/keyed store IC calls.
628 const char* f1_source = "function f1(x) { return x.y; };"; 626 const char* f1_source = "function f1(x) { return x.y; };";
629 const char* g1_source = "function g1(x) { x.y = 1; };"; 627 const char* g1_source = "function g1(x) { x.y = 1; };";
630 const char* f2_source = "function f2(x, y) { return x[y]; };"; 628 const char* f2_source = "function f2(x, y) { return x[y]; };";
631 const char* g2_source = "function g2(x, y) { x[y] = 1; };"; 629 const char* g2_source = "function g2(x, y) { x[y] = 1; };";
632 630
633 { 631 {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 NonIncrementalGC(); 690 NonIncrementalGC();
693 691
694 CHECK(!GetJSFunction(env->Global(), "f1")->IsOptimized()); 692 CHECK(!GetJSFunction(env->Global(), "f1")->IsOptimized());
695 CHECK(!GetJSFunction(env->Global(), "g1")->IsOptimized()); 693 CHECK(!GetJSFunction(env->Global(), "g1")->IsOptimized());
696 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized()); 694 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized());
697 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized()); 695 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized());
698 CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value()); 696 CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value());
699 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value()); 697 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value());
700 CHECK_EQ(0, Deoptimizer::GetDeoptimizedCodeCount(CcTest::i_isolate())); 698 CHECK_EQ(0, Deoptimizer::GetDeoptimizedCodeCount(CcTest::i_isolate()));
701 } 699 }
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | test/mjsunit/regress/regress-map-invalidation-2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698