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

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

Issue 185653004: Experimental parser: merge to r19637 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 9 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/cctest/test-debug.cc ('k') | test/cctest/test-disasm-a64.cc » ('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 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 "g2(new X(), 'z');"); 606 "g2(new X(), 'z');");
607 } 607 }
608 NonIncrementalGC(); 608 NonIncrementalGC();
609 609
610 CHECK(!GetJSFunction(env->Global(), "f1")->IsOptimized()); 610 CHECK(!GetJSFunction(env->Global(), "f1")->IsOptimized());
611 CHECK(!GetJSFunction(env->Global(), "g1")->IsOptimized()); 611 CHECK(!GetJSFunction(env->Global(), "g1")->IsOptimized());
612 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized()); 612 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized());
613 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized()); 613 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized());
614 CHECK_EQ(4, env->Global()->Get(v8_str("count"))->Int32Value()); 614 CHECK_EQ(4, env->Global()->Get(v8_str("count"))->Int32Value());
615 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value()); 615 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value());
616 CHECK_EQ(0, Deoptimizer::GetDeoptimizedCodeCount(CcTest::i_isolate()));
617 } 616 }
618 617
619 618
620 TEST(DeoptimizeLoadICStoreICNested) { 619 TEST(DeoptimizeLoadICStoreICNested) {
621 i::FLAG_concurrent_recompilation = false; 620 i::FLAG_concurrent_recompilation = false;
622 LocalContext env; 621 LocalContext env;
623 v8::HandleScope scope(env->GetIsolate()); 622 v8::HandleScope scope(env->GetIsolate());
624 623
625 // Functions to generate load/store/keyed load/keyed store IC calls. 624 // Functions to generate load/store/keyed load/keyed store IC calls.
626 const char* f1_source = "function f1(x) { return x.y; };"; 625 const char* f1_source = "function f1(x) { return x.y; };";
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 "var result = f1(new X());"); 687 "var result = f1(new X());");
689 } 688 }
690 NonIncrementalGC(); 689 NonIncrementalGC();
691 690
692 CHECK(!GetJSFunction(env->Global(), "f1")->IsOptimized()); 691 CHECK(!GetJSFunction(env->Global(), "f1")->IsOptimized());
693 CHECK(!GetJSFunction(env->Global(), "g1")->IsOptimized()); 692 CHECK(!GetJSFunction(env->Global(), "g1")->IsOptimized());
694 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized()); 693 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized());
695 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized()); 694 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized());
696 CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value()); 695 CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value());
697 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value()); 696 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value());
698 CHECK_EQ(0, Deoptimizer::GetDeoptimizedCodeCount(CcTest::i_isolate()));
699 } 697 }
OLDNEW
« no previous file with comments | « test/cctest/test-debug.cc ('k') | test/cctest/test-disasm-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698