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 2298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2309 Immediate(kFlatAsciiStringTag + (kFlatAsciiStringTag << 3))); | 2309 Immediate(kFlatAsciiStringTag + (kFlatAsciiStringTag << 3))); |
2310 j(not_equal, on_fail, near_jump); | 2310 j(not_equal, on_fail, near_jump); |
2311 } | 2311 } |
2312 | 2312 |
2313 | 2313 |
2314 template<class T> | 2314 template<class T> |
2315 static void JumpIfNotUniqueNameHelper(MacroAssembler* masm, | 2315 static void JumpIfNotUniqueNameHelper(MacroAssembler* masm, |
2316 T operand_or_register, | 2316 T operand_or_register, |
2317 Label* not_unique_name, | 2317 Label* not_unique_name, |
2318 Label::Distance distance) { | 2318 Label::Distance distance) { |
2319 STATIC_ASSERT(((SYMBOL_TYPE - 1) & kIsInternalizedMask) == kInternalizedTag); | 2319 STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0); |
2320 masm->cmpb(operand_or_register, Immediate(kInternalizedTag)); | 2320 Label succeed; |
2321 masm->j(less, not_unique_name, distance); | 2321 masm->testb(operand_or_register, |
2322 masm->cmpb(operand_or_register, Immediate(SYMBOL_TYPE)); | 2322 Immediate(kIsNotStringMask | kIsNotInternalizedMask)); |
2323 masm->j(greater, not_unique_name, distance); | 2323 masm->j(zero, &succeed, Label::kNear); |
| 2324 masm->cmpb(operand_or_register, Immediate(static_cast<uint8_t>(SYMBOL_TYPE))); |
| 2325 masm->j(not_equal, not_unique_name, distance); |
| 2326 |
| 2327 masm->bind(&succeed); |
2324 } | 2328 } |
2325 | 2329 |
2326 | 2330 |
2327 void MacroAssembler::JumpIfNotUniqueName(Operand operand, | 2331 void MacroAssembler::JumpIfNotUniqueName(Operand operand, |
2328 Label* not_unique_name, | 2332 Label* not_unique_name, |
2329 Label::Distance distance) { | 2333 Label::Distance distance) { |
2330 JumpIfNotUniqueNameHelper<Operand>(this, operand, not_unique_name, distance); | 2334 JumpIfNotUniqueNameHelper<Operand>(this, operand, not_unique_name, distance); |
2331 } | 2335 } |
2332 | 2336 |
2333 | 2337 |
(...skipping 2352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4686 j(greater, &no_info_available); | 4690 j(greater, &no_info_available); |
4687 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), | 4691 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), |
4688 Heap::kAllocationSiteInfoMapRootIndex); | 4692 Heap::kAllocationSiteInfoMapRootIndex); |
4689 bind(&no_info_available); | 4693 bind(&no_info_available); |
4690 } | 4694 } |
4691 | 4695 |
4692 | 4696 |
4693 } } // namespace v8::internal | 4697 } } // namespace v8::internal |
4694 | 4698 |
4695 #endif // V8_TARGET_ARCH_X64 | 4699 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |