OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 push(scratch1); | 859 push(scratch1); |
860 fild_s(Operand(esp, 0)); | 860 fild_s(Operand(esp, 0)); |
861 pop(scratch1); | 861 pop(scratch1); |
862 fstp_d(FieldOperand(elements, key, times_4, | 862 fstp_d(FieldOperand(elements, key, times_4, |
863 FixedDoubleArray::kHeaderSize - elements_offset)); | 863 FixedDoubleArray::kHeaderSize - elements_offset)); |
864 } | 864 } |
865 bind(&done); | 865 bind(&done); |
866 } | 866 } |
867 | 867 |
868 | 868 |
869 void MacroAssembler::CompareMap(Register obj, | 869 void MacroAssembler::CompareMap(Register obj, Handle<Map> map) { |
870 Handle<Map> map, | |
871 Label* early_success) { | |
872 cmp(FieldOperand(obj, HeapObject::kMapOffset), map); | 870 cmp(FieldOperand(obj, HeapObject::kMapOffset), map); |
873 } | 871 } |
874 | 872 |
875 | 873 |
876 void MacroAssembler::CheckMap(Register obj, | 874 void MacroAssembler::CheckMap(Register obj, |
877 Handle<Map> map, | 875 Handle<Map> map, |
878 Label* fail, | 876 Label* fail, |
879 SmiCheckType smi_check_type) { | 877 SmiCheckType smi_check_type) { |
880 if (smi_check_type == DO_SMI_CHECK) { | 878 if (smi_check_type == DO_SMI_CHECK) { |
881 JumpIfSmi(obj, fail); | 879 JumpIfSmi(obj, fail); |
882 } | 880 } |
883 | 881 |
884 Label success; | 882 CompareMap(obj, map); |
885 CompareMap(obj, map, &success); | |
886 j(not_equal, fail); | 883 j(not_equal, fail); |
887 bind(&success); | |
888 } | 884 } |
889 | 885 |
890 | 886 |
891 void MacroAssembler::DispatchMap(Register obj, | 887 void MacroAssembler::DispatchMap(Register obj, |
892 Register unused, | 888 Register unused, |
893 Handle<Map> map, | 889 Handle<Map> map, |
894 Handle<Code> success, | 890 Handle<Code> success, |
895 SmiCheckType smi_check_type) { | 891 SmiCheckType smi_check_type) { |
896 Label fail; | 892 Label fail; |
897 if (smi_check_type == DO_SMI_CHECK) { | 893 if (smi_check_type == DO_SMI_CHECK) { |
(...skipping 2648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3546 cmp(scratch_reg, Operand::StaticVariable(new_space_allocation_top)); | 3542 cmp(scratch_reg, Operand::StaticVariable(new_space_allocation_top)); |
3547 j(greater, no_memento_found); | 3543 j(greater, no_memento_found); |
3548 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize), | 3544 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize), |
3549 Immediate(isolate()->factory()->allocation_memento_map())); | 3545 Immediate(isolate()->factory()->allocation_memento_map())); |
3550 } | 3546 } |
3551 | 3547 |
3552 | 3548 |
3553 } } // namespace v8::internal | 3549 } } // namespace v8::internal |
3554 | 3550 |
3555 #endif // V8_TARGET_ARCH_IA32 | 3551 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |