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

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

Issue 657313005: ReceiverCheckMode needs to be utilized further. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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/code-stubs.h ('k') | src/mips/code-stubs-mips.cc » ('j') | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 // Return address is on the stack. 695 // Return address is on the stack.
696 Label miss; 696 Label miss;
697 697
698 Register receiver = LoadDescriptor::ReceiverRegister(); 698 Register receiver = LoadDescriptor::ReceiverRegister();
699 Register index = LoadDescriptor::NameRegister(); 699 Register index = LoadDescriptor::NameRegister();
700 Register scratch = ebx; 700 Register scratch = ebx;
701 DCHECK(!scratch.is(receiver) && !scratch.is(index)); 701 DCHECK(!scratch.is(receiver) && !scratch.is(index));
702 Register result = eax; 702 Register result = eax;
703 DCHECK(!result.is(scratch)); 703 DCHECK(!result.is(scratch));
704 704
705 // TODO(mvstanton): the generator doesn't need to verify that
706 // receiver is a string map, that is done outside the handler.
707 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, 705 StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
708 &miss, // When not a string. 706 &miss, // When not a string.
709 &miss, // When not a number. 707 &miss, // When not a number.
710 &miss, // When index out of range. 708 &miss, // When index out of range.
711 STRING_INDEX_IS_ARRAY_INDEX, 709 STRING_INDEX_IS_ARRAY_INDEX,
712 RECEIVER_IS_STRING); 710 RECEIVER_IS_STRING);
713 char_at_generator.GenerateFast(masm); 711 char_at_generator.GenerateFast(masm);
714 __ ret(0); 712 __ ret(0);
715 713
716 StubRuntimeCallHelper call_helper; 714 StubRuntimeCallHelper call_helper;
(...skipping 2435 matching lines...) Expand 10 before | Expand all | Expand 10 after
3152 3150
3153 // Just jump to runtime to create the sub string. 3151 // Just jump to runtime to create the sub string.
3154 __ bind(&runtime); 3152 __ bind(&runtime);
3155 __ TailCallRuntime(Runtime::kSubString, 3, 1); 3153 __ TailCallRuntime(Runtime::kSubString, 3, 1);
3156 3154
3157 __ bind(&single_char); 3155 __ bind(&single_char);
3158 // eax: string 3156 // eax: string
3159 // ebx: instance type 3157 // ebx: instance type
3160 // ecx: sub string length (smi) 3158 // ecx: sub string length (smi)
3161 // edx: from index (smi) 3159 // edx: from index (smi)
3162 StringCharAtGenerator generator( 3160 StringCharAtGenerator generator(eax, edx, ecx, eax, &runtime, &runtime,
3163 eax, edx, ecx, eax, &runtime, &runtime, &runtime, STRING_INDEX_IS_NUMBER); 3161 &runtime, STRING_INDEX_IS_NUMBER,
3162 RECEIVER_IS_STRING);
3164 generator.GenerateFast(masm); 3163 generator.GenerateFast(masm);
3165 __ ret(3 * kPointerSize); 3164 __ ret(3 * kPointerSize);
3166 generator.SkipSlow(masm, &runtime); 3165 generator.SkipSlow(masm, &runtime);
3167 } 3166 }
3168 3167
3169 3168
3170 void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm, 3169 void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm,
3171 Register left, 3170 Register left,
3172 Register right, 3171 Register right,
3173 Register scratch1, 3172 Register scratch1,
(...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after
4735 Operand(ebp, 7 * kPointerSize), 4734 Operand(ebp, 7 * kPointerSize),
4736 NULL); 4735 NULL);
4737 } 4736 }
4738 4737
4739 4738
4740 #undef __ 4739 #undef __
4741 4740
4742 } } // namespace v8::internal 4741 } } // namespace v8::internal
4743 4742
4744 #endif // V8_TARGET_ARCH_IA32 4743 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698