Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 6ddc024258940f2776c0b400105a6dd9b56dddfe..60a42eb6b50b6b7f9c441036e48bd62fb9b551a0 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -4119,12 +4119,21 @@ void LCodeGen::DoCheckMapCommon(Register reg, |
} |
-void LCodeGen::DoCheckMap(LCheckMap* instr) { |
+void LCodeGen::DoCheckMaps(LCheckMaps* instr) { |
LOperand* input = instr->InputAt(0); |
ASSERT(input->IsRegister()); |
Register reg = ToRegister(input); |
- Handle<Map> map = instr->hydrogen()->map(); |
- DoCheckMapCommon(reg, 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, map, &success, REQUIRE_EXACT_MAP); |
+ __ j(equal, &success); |
+ } |
+ Handle<Map> map = map_set->last(); |
+ DoCheckMapCommon(reg, map, REQUIRE_EXACT_MAP, instr->environment()); |
+ __ bind(&success); |
} |