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

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 9625003: Tweaks to SubStringStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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/mips/code-stubs-mips.cc ('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 5211 matching lines...) Expand 10 before | Expand all | Expand 10 after
5222 Label two_byte_slice, set_slice_header; 5222 Label two_byte_slice, set_slice_header;
5223 STATIC_ASSERT((kStringEncodingMask & kAsciiStringTag) != 0); 5223 STATIC_ASSERT((kStringEncodingMask & kAsciiStringTag) != 0);
5224 STATIC_ASSERT((kStringEncodingMask & kTwoByteStringTag) == 0); 5224 STATIC_ASSERT((kStringEncodingMask & kTwoByteStringTag) == 0);
5225 __ testb(rbx, Immediate(kStringEncodingMask)); 5225 __ testb(rbx, Immediate(kStringEncodingMask));
5226 __ j(zero, &two_byte_slice, Label::kNear); 5226 __ j(zero, &two_byte_slice, Label::kNear);
5227 __ AllocateAsciiSlicedString(rax, rbx, r14, &runtime); 5227 __ AllocateAsciiSlicedString(rax, rbx, r14, &runtime);
5228 __ jmp(&set_slice_header, Label::kNear); 5228 __ jmp(&set_slice_header, Label::kNear);
5229 __ bind(&two_byte_slice); 5229 __ bind(&two_byte_slice);
5230 __ AllocateTwoByteSlicedString(rax, rbx, r14, &runtime); 5230 __ AllocateTwoByteSlicedString(rax, rbx, r14, &runtime);
5231 __ bind(&set_slice_header); 5231 __ bind(&set_slice_header);
5232 __ movq(FieldOperand(rax, SlicedString::kOffsetOffset), rdx);
5233 __ Integer32ToSmi(rcx, rcx); 5232 __ Integer32ToSmi(rcx, rcx);
5234 __ movq(FieldOperand(rax, SlicedString::kLengthOffset), rcx); 5233 __ movq(FieldOperand(rax, SlicedString::kLengthOffset), rcx);
5235 __ movq(FieldOperand(rax, SlicedString::kParentOffset), rdi);
5236 __ movq(FieldOperand(rax, SlicedString::kHashFieldOffset), 5234 __ movq(FieldOperand(rax, SlicedString::kHashFieldOffset),
5237 Immediate(String::kEmptyHashField)); 5235 Immediate(String::kEmptyHashField));
5236 __ movq(FieldOperand(rax, SlicedString::kParentOffset), rdi);
5237 __ movq(FieldOperand(rax, SlicedString::kOffsetOffset), rdx);
5238 __ IncrementCounter(counters->sub_string_native(), 1); 5238 __ IncrementCounter(counters->sub_string_native(), 1);
5239 __ ret(kArgumentsSize); 5239 __ ret(kArgumentsSize);
5240 5240
5241 __ bind(&copy_routine); 5241 __ bind(&copy_routine);
5242 } 5242 }
5243 5243
5244 // rdi: underlying subject string 5244 // rdi: underlying subject string
5245 // rbx: instance type of underlying subject string 5245 // rbx: instance type of underlying subject string
5246 // rdx: adjusted start index (smi) 5246 // rdx: adjusted start index (smi)
5247 // rcx: length 5247 // rcx: length
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
6331 xmm0, 6331 xmm0,
6332 &slow_elements); 6332 &slow_elements);
6333 __ ret(0); 6333 __ ret(0);
6334 } 6334 }
6335 6335
6336 #undef __ 6336 #undef __
6337 6337
6338 } } // namespace v8::internal 6338 } } // namespace v8::internal
6339 6339
6340 #endif // V8_TARGET_ARCH_X64 6340 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698