Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(535)

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 17895002: The check for internalized strings relied on the fact that we had less (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: More comments Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 template<class T>
2312 static void JumpIfNotUniqueNameHelper(MacroAssembler* masm,
2313 T operand_or_register,
2314 Label* not_unique_name,
2315 Label::Distance distance) {
2316 STATIC_ASSERT(((SYMBOL_TYPE - 1) & kIsInternalizedMask) == kInternalizedTag);
2317 masm->cmpb(operand_or_register, Immediate(kInternalizedTag));
2318 masm->j(less, not_unique_name, distance);
2319 masm->cmpb(operand_or_register, Immediate(SYMBOL_TYPE));
2320 masm->j(greater, not_unique_name, distance);
2321 }
2322
2323
2324 void MacroAssembler::JumpIfNotUniqueName(Operand operand,
2325 Label* not_unique_name,
2326 Label::Distance distance) {
2327 JumpIfNotUniqueNameHelper<Operand>(this, operand, not_unique_name, distance);
2328 }
2329
2330
2331 void MacroAssembler::JumpIfNotUniqueName(Register reg,
2332 Label* not_unique_name,
2333 Label::Distance distance) {
2334 JumpIfNotUniqueNameHelper<Register>(this, reg, not_unique_name, distance);
2335 }
2336
2311 2337
2312 void MacroAssembler::Move(Register dst, Register src) { 2338 void MacroAssembler::Move(Register dst, Register src) {
2313 if (!dst.is(src)) { 2339 if (!dst.is(src)) {
2314 movq(dst, src); 2340 movq(dst, src);
2315 } 2341 }
2316 } 2342 }
2317 2343
2318 2344
2319 void MacroAssembler::Move(Register dst, Handle<Object> source) { 2345 void MacroAssembler::Move(Register dst, Handle<Object> source) {
2320 AllowDeferredHandleDereference smi_check; 2346 AllowDeferredHandleDereference smi_check;
(...skipping 2380 matching lines...) Expand 10 before | Expand all | Expand 10 after
4701 j(greater, &no_info_available); 4727 j(greater, &no_info_available);
4702 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), 4728 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize),
4703 Heap::kAllocationSiteInfoMapRootIndex); 4729 Heap::kAllocationSiteInfoMapRootIndex);
4704 bind(&no_info_available); 4730 bind(&no_info_available);
4705 } 4731 }
4706 4732
4707 4733
4708 } } // namespace v8::internal 4734 } } // namespace v8::internal
4709 4735
4710 #endif // V8_TARGET_ARCH_X64 4736 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698