OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 10277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10288 __ bind(&check_unequal_objects); | 10288 __ bind(&check_unequal_objects); |
10289 if (cc_ == equal && !strict_) { | 10289 if (cc_ == equal && !strict_) { |
10290 // Not strict equality. Objects are unequal if | 10290 // Not strict equality. Objects are unequal if |
10291 // they are both JSObjects and not undetectable, | 10291 // they are both JSObjects and not undetectable, |
10292 // and their pointers are different. | 10292 // and their pointers are different. |
10293 Label not_both_objects, return_unequal; | 10293 Label not_both_objects, return_unequal; |
10294 // At most one is a smi, so we can test for smi by adding the two. | 10294 // At most one is a smi, so we can test for smi by adding the two. |
10295 // A smi plus a heap object has the low bit set, a heap object plus | 10295 // A smi plus a heap object has the low bit set, a heap object plus |
10296 // a heap object has the low bit clear. | 10296 // a heap object has the low bit clear. |
10297 ASSERT_EQ(0, kSmiTag); | 10297 ASSERT_EQ(0, kSmiTag); |
10298 ASSERT_EQ(V8_UINT64_C(1), kSmiTagMask); | 10298 ASSERT_EQ(static_cast<int64_t>(1), kSmiTagMask); |
10299 __ lea(rcx, Operand(rax, rdx, times_1, 0)); | 10299 __ lea(rcx, Operand(rax, rdx, times_1, 0)); |
10300 __ testb(rcx, Immediate(kSmiTagMask)); | 10300 __ testb(rcx, Immediate(kSmiTagMask)); |
10301 __ j(not_zero, ¬_both_objects); | 10301 __ j(not_zero, ¬_both_objects); |
10302 __ CmpObjectType(rax, FIRST_JS_OBJECT_TYPE, rbx); | 10302 __ CmpObjectType(rax, FIRST_JS_OBJECT_TYPE, rbx); |
10303 __ j(below, ¬_both_objects); | 10303 __ j(below, ¬_both_objects); |
10304 __ CmpObjectType(rdx, FIRST_JS_OBJECT_TYPE, rcx); | 10304 __ CmpObjectType(rdx, FIRST_JS_OBJECT_TYPE, rcx); |
10305 __ j(below, ¬_both_objects); | 10305 __ j(below, ¬_both_objects); |
10306 __ testb(FieldOperand(rbx, Map::kBitFieldOffset), | 10306 __ testb(FieldOperand(rbx, Map::kBitFieldOffset), |
10307 Immediate(1 << Map::kIsUndetectable)); | 10307 Immediate(1 << Map::kIsUndetectable)); |
10308 __ j(zero, &return_unequal); | 10308 __ j(zero, &return_unequal); |
(...skipping 1735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12044 #undef __ | 12044 #undef __ |
12045 | 12045 |
12046 void RecordWriteStub::Generate(MacroAssembler* masm) { | 12046 void RecordWriteStub::Generate(MacroAssembler* masm) { |
12047 masm->RecordWriteHelper(object_, addr_, scratch_); | 12047 masm->RecordWriteHelper(object_, addr_, scratch_); |
12048 masm->ret(0); | 12048 masm->ret(0); |
12049 } | 12049 } |
12050 | 12050 |
12051 } } // namespace v8::internal | 12051 } } // namespace v8::internal |
12052 | 12052 |
12053 #endif // V8_TARGET_ARCH_X64 | 12053 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |