Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index ba43e4230fd9667577d5fa7457443da20f178e59..ee37d0b5837404cc9db6bfd420a69f615221da67 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -2011,9 +2011,15 @@ void LCodeGen::DoConstantE(LConstantE* instr) { |
void LCodeGen::DoConstantT(LConstantT* instr) { |
Register reg = ToRegister(instr->result()); |
- Handle<Object> handle = instr->value(isolate()); |
+ Handle<Object> object = instr->value(isolate()); |
AllowDeferredHandleDereference smi_check; |
- __ LoadObject(reg, handle); |
+ if (instr->hydrogen()->HasObjectMap()) { |
+ Handle<Map> object_map = instr->hydrogen()->ObjectMap().handle(); |
+ CHECK(object->IsHeapObject()); |
+ CHECK(!object_map->is_stable() || |
+ *object_map == Handle<HeapObject>::cast(object)->map()); |
+ } |
+ __ LoadObject(reg, object); |
} |