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

Unified Diff: test/cctest/test-compiler.cc

Issue 398053002: Introduce FLAG_vector_ics. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 years, 5 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 | « src/x64/lithium-x64.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-compiler.cc
diff --git a/test/cctest/test-compiler.cc b/test/cctest/test-compiler.cc
index c7c8f3fc2551309efecb0c9fa93066aa27fdcf49..2d913715e1e25f914946e5541ad06b885ea7eb2b 100644
--- a/test/cctest/test-compiler.cc
+++ b/test/cctest/test-compiler.cc
@@ -309,8 +309,9 @@ TEST(FeedbackVectorPreservedAcrossRecompiles) {
Handle<FixedArray> feedback_vector(f->shared()->feedback_vector());
// Verify that we gathered feedback.
- CHECK_EQ(1, feedback_vector->length());
- CHECK(feedback_vector->get(0)->IsJSFunction());
+ int expected_count = FLAG_vector_ics ? 2 : 1;
+ CHECK_EQ(expected_count, feedback_vector->length());
+ CHECK(feedback_vector->get(expected_count - 1)->IsJSFunction());
CompileRun("%OptimizeFunctionOnNextCall(f); f(fun1);");
@@ -318,7 +319,8 @@ TEST(FeedbackVectorPreservedAcrossRecompiles) {
// of the full code.
CHECK(f->IsOptimized());
CHECK(f->shared()->has_deoptimization_support());
- CHECK(f->shared()->feedback_vector()->get(0)->IsJSFunction());
+ CHECK(f->shared()->feedback_vector()->
+ get(expected_count - 1)->IsJSFunction());
}
@@ -344,16 +346,15 @@ TEST(FeedbackVectorUnaffectedByScopeChanges) {
*v8::Handle<v8::Function>::Cast(
CcTest::global()->Get(v8_str("morphing_call"))));
- // morphing_call should have one feedback vector slot for the call to
- // call_target().
- CHECK_EQ(1, f->shared()->feedback_vector()->length());
+ int expected_count = FLAG_vector_ics ? 2 : 1;
+ CHECK_EQ(expected_count, f->shared()->feedback_vector()->length());
// And yet it's not compiled.
CHECK(!f->shared()->is_compiled());
CompileRun("morphing_call();");
// The vector should have the same size despite the new scoping.
- CHECK_EQ(1, f->shared()->feedback_vector()->length());
+ CHECK_EQ(expected_count, f->shared()->feedback_vector()->length());
CHECK(f->shared()->is_compiled());
}
« no previous file with comments | « src/x64/lithium-x64.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698