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

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

Issue 153823003: Use stability to only conditionally flush information from the CheckMaps table. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed last comment 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;
541 LocalContext env; 542 LocalContext env;
542 v8::HandleScope scope(env->GetIsolate()); 543 v8::HandleScope scope(env->GetIsolate());
543 544
544 // Functions to generate load/store/keyed load/keyed store IC calls. 545 // Functions to generate load/store/keyed load/keyed store IC calls.
545 const char* f1_source = "function f1(x) { return x.y; };"; 546 const char* f1_source = "function f1(x) { return x.y; };";
546 const char* g1_source = "function g1(x) { x.y = 1; };"; 547 const char* g1_source = "function g1(x) { x.y = 1; };";
547 const char* f2_source = "function f2(x, y) { return x[y]; };"; 548 const char* f2_source = "function f2(x, y) { return x[y]; };";
548 const char* g2_source = "function g2(x, y) { x[y] = 1; };"; 549 const char* g2_source = "function g2(x, y) { x[y] = 1; };";
549 550
550 { 551 {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized()); 613 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized());
613 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized()); 614 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized());
614 CHECK_EQ(4, env->Global()->Get(v8_str("count"))->Int32Value()); 615 CHECK_EQ(4, env->Global()->Get(v8_str("count"))->Int32Value());
615 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value()); 616 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value());
616 CHECK_EQ(0, Deoptimizer::GetDeoptimizedCodeCount(CcTest::i_isolate())); 617 CHECK_EQ(0, Deoptimizer::GetDeoptimizedCodeCount(CcTest::i_isolate()));
617 } 618 }
618 619
619 620
620 TEST(DeoptimizeLoadICStoreICNested) { 621 TEST(DeoptimizeLoadICStoreICNested) {
621 i::FLAG_concurrent_recompilation = false; 622 i::FLAG_concurrent_recompilation = false;
623 i::FLAG_check_elimination = false;
622 LocalContext env; 624 LocalContext env;
623 v8::HandleScope scope(env->GetIsolate()); 625 v8::HandleScope scope(env->GetIsolate());
624 626
625 // Functions to generate load/store/keyed load/keyed store IC calls. 627 // Functions to generate load/store/keyed load/keyed store IC calls.
626 const char* f1_source = "function f1(x) { return x.y; };"; 628 const char* f1_source = "function f1(x) { return x.y; };";
627 const char* g1_source = "function g1(x) { x.y = 1; };"; 629 const char* g1_source = "function g1(x) { x.y = 1; };";
628 const char* f2_source = "function f2(x, y) { return x[y]; };"; 630 const char* f2_source = "function f2(x, y) { return x[y]; };";
629 const char* g2_source = "function g2(x, y) { x[y] = 1; };"; 631 const char* g2_source = "function g2(x, y) { x[y] = 1; };";
630 632
631 { 633 {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 NonIncrementalGC(); 692 NonIncrementalGC();
691 693
692 CHECK(!GetJSFunction(env->Global(), "f1")->IsOptimized()); 694 CHECK(!GetJSFunction(env->Global(), "f1")->IsOptimized());
693 CHECK(!GetJSFunction(env->Global(), "g1")->IsOptimized()); 695 CHECK(!GetJSFunction(env->Global(), "g1")->IsOptimized());
694 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized()); 696 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized());
695 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized()); 697 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized());
696 CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value()); 698 CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value());
697 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value()); 699 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value());
698 CHECK_EQ(0, Deoptimizer::GetDeoptimizedCodeCount(CcTest::i_isolate())); 700 CHECK_EQ(0, Deoptimizer::GetDeoptimizedCodeCount(CcTest::i_isolate()));
699 } 701 }
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