Revision: 11539
Author: [email protected]
Date: Thu May 10 13:34:06 2012
Log: Fix compose-discard crasher from 11524. We can't do a call (to a
generic
stub) unless there is a pointer map. This does not fix the 3d-raytrace
regression, that will be in another change.
Review URL: https://chromiumcodereview.appspot.com/10382102
http://code.google.com/p/v8/source/detail?r=11539
Modified:
/branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc
=======================================
--- /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Fri May 4
08:50:43 2012
+++ /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Thu May 10
13:34:06 2012
@@ -2275,8 +2275,7 @@
int map_count = instr->hydrogen()->types()->length();
Handle<String> name = instr->hydrogen()->name();
- if (map_count == 0) {
- ASSERT(instr->hydrogen()->need_generic());
+ if (map_count == 0 && instr->hydrogen()->need_generic()) {
__ mov(ecx, name);
Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
CallCode(ic, RelocInfo::CODE_TARGET, instr);
@@ -2291,20 +2290,28 @@
__ jmp(&done, Label::kNear);
__ bind(&next);
}
- Handle<Map> map = instr->hydrogen()->types()->last();
- __ cmp(FieldOperand(object, HeapObject::kMapOffset), map);
if (instr->hydrogen()->need_generic()) {
- Label generic;
- __ j(not_equal, &generic, Label::kNear);
- EmitLoadFieldOrConstantFunction(result, object, map, name);
- __ jmp(&done, Label::kNear);
- __ bind(&generic);
+ if (map_count != 0) {
+ Handle<Map> map = instr->hydrogen()->types()->last();
+ __ cmp(FieldOperand(object, HeapObject::kMapOffset), map);
+ Label generic;
+ __ j(not_equal, &generic, Label::kNear);
+ EmitLoadFieldOrConstantFunction(result, object, map, name);
+ __ jmp(&done, Label::kNear);
+ __ bind(&generic);
+ }
__ mov(ecx, name);
Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
CallCode(ic, RelocInfo::CODE_TARGET, instr);
} else {
- DeoptimizeIf(not_equal, instr->environment());
- EmitLoadFieldOrConstantFunction(result, object, map, name);
+ if (map_count != 0) {
+ Handle<Map> map = instr->hydrogen()->types()->last();
+ __ cmp(FieldOperand(object, HeapObject::kMapOffset), map);
+ DeoptimizeIf(not_equal, instr->environment());
+ EmitLoadFieldOrConstantFunction(result, object, map, name);
+ } else {
+ DeoptimizeIf(no_condition, instr->environment());
+ }
}
__ bind(&done);
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev