Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index fcbc90da5f8ed39fe30dee540a5c0e08542579a5..1d1af3a73d932818c57b4fef2ee57721bd4dd65f 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -4238,14 +4238,22 @@ void LCodeGen::DoCheckMapCommon(Register reg, |
} |
-void LCodeGen::DoCheckMap(LCheckMap* instr) { |
+void LCodeGen::DoCheckMaps(LCheckMaps* instr) { |
Register scratch = scratch0(); |
LOperand* input = instr->InputAt(0); |
ASSERT(input->IsRegister()); |
Register reg = ToRegister(input); |
- Handle<Map> map = instr->hydrogen()->map(); |
- DoCheckMapCommon(reg, scratch, map, instr->hydrogen()->mode(), |
- instr->environment()); |
+ |
+ Label success; |
+ SmallMapList* map_set = instr->hydrogen()->map_set(); |
+ for (int i = 0; i < map_set->length() - 1; i++) { |
+ Handle<Map> map = map_set->at(i); |
+ __ CompareMap(reg, scratch, map, &success, REQUIRE_EXACT_MAP); |
+ __ b(eq, &success); |
+ } |
+ Handle<Map> map = map_set->last(); |
+ DoCheckMapCommon(reg, scratch, map, REQUIRE_EXACT_MAP, instr->environment()); |
+ __ bind(&success); |
} |