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

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

Issue 664973002: X87: ReceiverCheckMode needs to be utilized further. (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@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
« no previous file with comments | « no previous file | 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 // 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_X87 7 #if V8_TARGET_ARCH_X87
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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 // Return address is on the stack. 375 // Return address is on the stack.
376 Label miss; 376 Label miss;
377 377
378 Register receiver = LoadDescriptor::ReceiverRegister(); 378 Register receiver = LoadDescriptor::ReceiverRegister();
379 Register index = LoadDescriptor::NameRegister(); 379 Register index = LoadDescriptor::NameRegister();
380 Register scratch = ebx; 380 Register scratch = ebx;
381 DCHECK(!scratch.is(receiver) && !scratch.is(index)); 381 DCHECK(!scratch.is(receiver) && !scratch.is(index));
382 Register result = eax; 382 Register result = eax;
383 DCHECK(!result.is(scratch)); 383 DCHECK(!result.is(scratch));
384 384
385 // TODO(mvstanton): the generator doesn't need to verify that
386 // receiver is a string map, that is done outside the handler.
387 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, 385 StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
388 &miss, // When not a string. 386 &miss, // When not a string.
389 &miss, // When not a number. 387 &miss, // When not a number.
390 &miss, // When index out of range. 388 &miss, // When index out of range.
391 STRING_INDEX_IS_ARRAY_INDEX, 389 STRING_INDEX_IS_ARRAY_INDEX,
392 RECEIVER_IS_STRING); 390 RECEIVER_IS_STRING);
393 char_at_generator.GenerateFast(masm); 391 char_at_generator.GenerateFast(masm);
394 __ ret(0); 392 __ ret(0);
395 393
396 StubRuntimeCallHelper call_helper; 394 StubRuntimeCallHelper call_helper;
(...skipping 2444 matching lines...) Expand 10 before | Expand all | Expand 10 after
2841 2839
2842 // Just jump to runtime to create the sub string. 2840 // Just jump to runtime to create the sub string.
2843 __ bind(&runtime); 2841 __ bind(&runtime);
2844 __ TailCallRuntime(Runtime::kSubString, 3, 1); 2842 __ TailCallRuntime(Runtime::kSubString, 3, 1);
2845 2843
2846 __ bind(&single_char); 2844 __ bind(&single_char);
2847 // eax: string 2845 // eax: string
2848 // ebx: instance type 2846 // ebx: instance type
2849 // ecx: sub string length (smi) 2847 // ecx: sub string length (smi)
2850 // edx: from index (smi) 2848 // edx: from index (smi)
2851 StringCharAtGenerator generator( 2849 StringCharAtGenerator generator(eax, edx, ecx, eax, &runtime, &runtime,
2852 eax, edx, ecx, eax, &runtime, &runtime, &runtime, STRING_INDEX_IS_NUMBER); 2850 &runtime, STRING_INDEX_IS_NUMBER,
2851 RECEIVER_IS_STRING);
2853 generator.GenerateFast(masm); 2852 generator.GenerateFast(masm);
2854 __ ret(3 * kPointerSize); 2853 __ ret(3 * kPointerSize);
2855 generator.SkipSlow(masm, &runtime); 2854 generator.SkipSlow(masm, &runtime);
2856 } 2855 }
2857 2856
2858 2857
2859 void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm, 2858 void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm,
2860 Register left, 2859 Register left,
2861 Register right, 2860 Register right,
2862 Register scratch1, 2861 Register scratch1,
(...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after
4394 Operand(ebp, 7 * kPointerSize), 4393 Operand(ebp, 7 * kPointerSize),
4395 NULL); 4394 NULL);
4396 } 4395 }
4397 4396
4398 4397
4399 #undef __ 4398 #undef __
4400 4399
4401 } } // namespace v8::internal 4400 } } // namespace v8::internal
4402 4401
4403 #endif // V8_TARGET_ARCH_X87 4402 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698