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 2290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2301 andl(scratch2, Immediate(kFlatAsciiStringMask)); | 2301 andl(scratch2, Immediate(kFlatAsciiStringMask)); |
2302 // Interleave the bits to check both scratch1 and scratch2 in one test. | 2302 // Interleave the bits to check both scratch1 and scratch2 in one test. |
2303 ASSERT_EQ(0, kFlatAsciiStringMask & (kFlatAsciiStringMask << 3)); | 2303 ASSERT_EQ(0, kFlatAsciiStringMask & (kFlatAsciiStringMask << 3)); |
2304 lea(scratch1, Operand(scratch1, scratch2, times_8, 0)); | 2304 lea(scratch1, Operand(scratch1, scratch2, times_8, 0)); |
2305 cmpl(scratch1, | 2305 cmpl(scratch1, |
2306 Immediate(kFlatAsciiStringTag + (kFlatAsciiStringTag << 3))); | 2306 Immediate(kFlatAsciiStringTag + (kFlatAsciiStringTag << 3))); |
2307 j(not_equal, on_fail, near_jump); | 2307 j(not_equal, on_fail, near_jump); |
2308 } | 2308 } |
2309 | 2309 |
2310 | 2310 |
2311 void MacroAssembler::JumpIfNotUniqueName(Operand operand, | |
2312 Label* not_unique_name, | |
2313 Label::Distance distance) { | |
2314 STATIC_ASSERT(((SYMBOL_TYPE - 1) & kIsInternalizedMask) == kInternalizedTag); | |
2315 cmpb(operand, Immediate(kInternalizedTag)); | |
2316 j(less, not_unique_name, distance); | |
2317 cmpb(operand, Immediate(SYMBOL_TYPE)); | |
2318 j(greater, not_unique_name, distance); | |
2319 } | |
2320 | |
2321 | |
2322 void MacroAssembler::JumpIfNotUniqueName(Register reg, | |
Yang
2013/06/27 07:48:36
This is like, a character-by-character copy. Could
mvstanton
2013/06/27 13:35:20
Done.
| |
2323 Label* not_unique_name, | |
2324 Label::Distance distance) { | |
2325 STATIC_ASSERT(((SYMBOL_TYPE - 1) & kIsInternalizedMask) == kInternalizedTag); | |
2326 cmpb(reg, Immediate(kInternalizedTag)); | |
2327 j(less, not_unique_name, distance); | |
2328 cmpb(reg, Immediate(SYMBOL_TYPE)); | |
2329 j(greater, not_unique_name, distance); | |
2330 } | |
2331 | |
2311 | 2332 |
2312 void MacroAssembler::Move(Register dst, Register src) { | 2333 void MacroAssembler::Move(Register dst, Register src) { |
2313 if (!dst.is(src)) { | 2334 if (!dst.is(src)) { |
2314 movq(dst, src); | 2335 movq(dst, src); |
2315 } | 2336 } |
2316 } | 2337 } |
2317 | 2338 |
2318 | 2339 |
2319 void MacroAssembler::Move(Register dst, Handle<Object> source) { | 2340 void MacroAssembler::Move(Register dst, Handle<Object> source) { |
2320 AllowDeferredHandleDereference smi_check; | 2341 AllowDeferredHandleDereference smi_check; |
(...skipping 2380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4701 j(greater, &no_info_available); | 4722 j(greater, &no_info_available); |
4702 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), | 4723 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), |
4703 Heap::kAllocationSiteInfoMapRootIndex); | 4724 Heap::kAllocationSiteInfoMapRootIndex); |
4704 bind(&no_info_available); | 4725 bind(&no_info_available); |
4705 } | 4726 } |
4706 | 4727 |
4707 | 4728 |
4708 } } // namespace v8::internal | 4729 } } // namespace v8::internal |
4709 | 4730 |
4710 #endif // V8_TARGET_ARCH_X64 | 4731 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |