| Index: test/cctest/test-compiler.cc
|
| diff --git a/test/cctest/test-compiler.cc b/test/cctest/test-compiler.cc
|
| index 4d6e005a8b8cf3fe1b35f39e79310614310952b5..d3c06baa45e08198540d007c69db049c21781108 100644
|
| --- a/test/cctest/test-compiler.cc
|
| +++ b/test/cctest/test-compiler.cc
|
| @@ -306,12 +306,15 @@ TEST(FeedbackVectorPreservedAcrossRecompiles) {
|
| // We shouldn't have deoptimization support. We want to recompile and
|
| // verify that our feedback vector preserves information.
|
| CHECK(!f->shared()->has_deoptimization_support());
|
| - Handle<FixedArray> feedback_vector(f->shared()->feedback_vector());
|
| + Handle<TypeFeedbackVector> feedback_vector(f->shared()->feedback_vector());
|
|
|
| // Verify that we gathered feedback.
|
| - int expected_count = FLAG_vector_ics ? 2 : 1;
|
| - CHECK_EQ(expected_count, feedback_vector->length());
|
| - CHECK(feedback_vector->get(expected_count - 1)->IsJSFunction());
|
| + int expected_slots = 0;
|
| + int expected_ic_slots = FLAG_vector_ics ? 2 : 1;
|
| + CHECK_EQ(expected_slots, feedback_vector->Slots());
|
| + CHECK_EQ(expected_ic_slots, feedback_vector->ICSlots());
|
| + FeedbackVectorICSlot slot_for_a(FLAG_vector_ics ? 1 : 0);
|
| + CHECK(feedback_vector->Get(slot_for_a)->IsJSFunction());
|
|
|
| CompileRun("%OptimizeFunctionOnNextCall(f); f(fun1);");
|
|
|
| @@ -319,8 +322,7 @@ TEST(FeedbackVectorPreservedAcrossRecompiles) {
|
| // of the full code.
|
| CHECK(f->IsOptimized());
|
| CHECK(f->shared()->has_deoptimization_support());
|
| - CHECK(f->shared()->feedback_vector()->
|
| - get(expected_count - 1)->IsJSFunction());
|
| + CHECK(f->shared()->feedback_vector()->Get(slot_for_a)->IsJSFunction());
|
| }
|
|
|
|
|
| @@ -346,15 +348,19 @@ TEST(FeedbackVectorUnaffectedByScopeChanges) {
|
| *v8::Handle<v8::Function>::Cast(
|
| CcTest::global()->Get(v8_str("morphing_call"))));
|
|
|
| - int expected_count = FLAG_vector_ics ? 2 : 1;
|
| - CHECK_EQ(expected_count, f->shared()->feedback_vector()->length());
|
| + int expected_slots = 0;
|
| + int expected_ic_slots = FLAG_vector_ics ? 2 : 1;
|
| + CHECK_EQ(expected_slots, f->shared()->feedback_vector()->Slots());
|
| + CHECK_EQ(expected_ic_slots, f->shared()->feedback_vector()->ICSlots());
|
| +
|
| // 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(expected_count, f->shared()->feedback_vector()->length());
|
| + CHECK_EQ(expected_slots, f->shared()->feedback_vector()->Slots());
|
| + CHECK_EQ(expected_ic_slots, f->shared()->feedback_vector()->ICSlots());
|
| CHECK(f->shared()->is_compiled());
|
| }
|
|
|
|
|