X87: ReceiverCheckMode needs to be utilized further.

port r24704.

original commit message:

  ReceiverCheckMode needs to be utilized further.

  The parameter wasn't being passed appropriately, and there was an extra
   opportunity to use mode RECEIVER_IS_STRING in SubStringStub.

BUG=
R=weiliang.lin@intel.com

Review URL: https://codereview.chromium.org/664973002

Patch from Chunyang Dai <chunyang.dai@intel.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24714 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 66febc0a
...@@ -382,8 +382,6 @@ void LoadIndexedStringStub::Generate(MacroAssembler* masm) { ...@@ -382,8 +382,6 @@ void LoadIndexedStringStub::Generate(MacroAssembler* masm) {
Register result = eax; Register result = eax;
DCHECK(!result.is(scratch)); DCHECK(!result.is(scratch));
// TODO(mvstanton): the generator doesn't need to verify that
// receiver is a string map, that is done outside the handler.
StringCharAtGenerator char_at_generator(receiver, index, scratch, result, StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
&miss, // When not a string. &miss, // When not a string.
&miss, // When not a number. &miss, // When not a number.
...@@ -2848,8 +2846,9 @@ void SubStringStub::Generate(MacroAssembler* masm) { ...@@ -2848,8 +2846,9 @@ void SubStringStub::Generate(MacroAssembler* masm) {
// ebx: instance type // ebx: instance type
// ecx: sub string length (smi) // ecx: sub string length (smi)
// edx: from index (smi) // edx: from index (smi)
StringCharAtGenerator generator( StringCharAtGenerator generator(eax, edx, ecx, eax, &runtime, &runtime,
eax, edx, ecx, eax, &runtime, &runtime, &runtime, STRING_INDEX_IS_NUMBER); &runtime, STRING_INDEX_IS_NUMBER,
RECEIVER_IS_STRING);
generator.GenerateFast(masm); generator.GenerateFast(masm);
__ ret(3 * kPointerSize); __ ret(3 * kPointerSize);
generator.SkipSlow(masm, &runtime); generator.SkipSlow(masm, &runtime);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment