Index: src/ia32/code-stubs-ia32.cc |
=================================================================== |
--- src/ia32/code-stubs-ia32.cc (revision 9957) |
+++ src/ia32/code-stubs-ia32.cc (working copy) |
@@ -6502,6 +6502,28 @@ |
} |
+void ICCompareStub::GenerateKnownObjects(MacroAssembler* masm, |
+ Handle<Map> map) { |
Kevin Millikin (Chromium)
2011/11/11 10:12:34
No need for the extra argument.
Rico
2011/11/15 10:12:26
Done.
|
+ Label miss; |
+ __ mov(ecx, edx); |
+ __ and_(ecx, eax); |
+ __ JumpIfSmi(ecx, &miss, Label::kNear); |
+ |
+ __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); |
+ __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset)); |
+ __ cmp(ecx, map); |
Kevin Millikin (Chromium)
2011/11/11 10:12:34
cmp(ecx, known_map_)
Rico
2011/11/15 10:12:26
Done (and below)
|
+ __ j(not_equal, &miss, Label::kNear); |
+ __ cmp(ebx, map); |
+ __ j(not_equal, &miss, Label::kNear); |
+ |
+ __ sub(eax, edx); |
+ __ ret(0); |
+ |
+ __ bind(&miss); |
+ GenerateMiss(masm); |
+} |
+ |
+ |
void ICCompareStub::GenerateMiss(MacroAssembler* masm) { |
// Save the registers. |
__ pop(ecx); |
Kevin Millikin (Chromium)
2011/11/11 10:12:34
I'm not sure why this code is written this way, bu
Rico
2011/11/15 10:12:26
Done.
|