Index: src/ic/ia32/handler-compiler-ia32.cc |
diff --git a/src/ic/ia32/handler-compiler-ia32.cc b/src/ic/ia32/handler-compiler-ia32.cc |
index 6e009038d22671f7c8ea717c1a479aaa6e00a585..d707e695d63c0b055b0348a3e0daa06b05347ac8 100644 |
--- a/src/ic/ia32/handler-compiler-ia32.cc |
+++ b/src/ic/ia32/handler-compiler-ia32.cc |
@@ -343,18 +343,10 @@ |
} |
-void NamedStoreHandlerCompiler::GenerateConstantCheck(Register map_reg, |
- int descriptor, |
+void NamedStoreHandlerCompiler::GenerateConstantCheck(Object* constant, |
Register value_reg, |
- Register scratch, |
Label* miss_label) { |
- DCHECK(!map_reg.is(scratch)); |
- DCHECK(!map_reg.is(value_reg)); |
- DCHECK(!value_reg.is(scratch)); |
- __ LoadInstanceDescriptors(map_reg, scratch); |
- __ mov(scratch, |
- FieldOperand(scratch, DescriptorArray::GetValueOffset(descriptor))); |
- __ cmp(value_reg, scratch); |
+ __ CmpObject(value_reg, handle(constant, isolate())); |
__ j(not_equal, miss_label); |
} |