VectorICs: recent changes broke cases with --novector-ics

Ensure that we protect turning off the vector ics flag.

BUG=
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/1087213002

Cr-Commit-Position: refs/heads/master@{#27844}
This commit is contained in:
mvstanton 2015-04-15 05:49:58 -07:00 committed by Commit bot
parent 969475b604
commit a2481f8dd9
2 changed files with 3 additions and 1 deletions

View File

@ -6927,7 +6927,7 @@ HInstruction* HOptimizedGraphBuilder::BuildKeyedGeneric(
New<HLoadKeyedGeneric>(object, key, initial_state);
// HLoadKeyedGeneric with vector ics benefits from being encoded as
// MEGAMORPHIC because the vector/slot combo becomes unnecessary.
if (initial_state != MEGAMORPHIC) {
if (FLAG_vector_ics && initial_state != MEGAMORPHIC) {
// We need to pass vector information.
Handle<TypeFeedbackVector> vector =
handle(current_feedback_vector(), isolate());

View File

@ -139,6 +139,8 @@ Handle<TypeFeedbackVector> TypeFeedbackVector::Copy(
bool TypeFeedbackVector::SpecDiffersFrom(
const ZoneFeedbackVectorSpec* other_spec) const {
if (!FLAG_vector_ics) return false;
if (other_spec->slots() != Slots() || other_spec->ic_slots() != ICSlots()) {
return true;
}