Remove unused StringCharCodeAt stub.

Review URL: http://codereview.chromium.org/6690014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7163 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
vitalyr@chromium.org 2011-03-14 16:54:51 +00:00
parent 2da91a4807
commit 8700f796e4
7 changed files with 0 additions and 185 deletions

View File

@ -6709,56 +6709,6 @@ void StringAddStub::GenerateConvertArgument(MacroAssembler* masm,
} }
void StringCharAtStub::Generate(MacroAssembler* masm) {
// Expects two arguments (object, index) on the stack:
// lr: return address
// sp[0]: index
// sp[4]: object
Register object = r1;
Register index = r0;
Register scratch1 = r2;
Register scratch2 = r3;
Register result = r0;
// Get object and index from the stack.
__ pop(index);
__ pop(object);
Label need_conversion;
Label index_out_of_range;
Label done;
StringCharAtGenerator generator(object,
index,
scratch1,
scratch2,
result,
&need_conversion,
&need_conversion,
&index_out_of_range,
STRING_INDEX_IS_NUMBER);
generator.GenerateFast(masm);
__ b(&done);
__ bind(&index_out_of_range);
// When the index is out of range, the spec requires us to return
// the empty string.
__ LoadRoot(result, Heap::kEmptyStringRootIndex);
__ jmp(&done);
__ bind(&need_conversion);
// Move smi zero into the result register, which will trigger
// conversion.
__ mov(result, Operand(Smi::FromInt(0)));
__ b(&done);
StubRuntimeCallHelper call_helper;
generator.GenerateSlow(masm, call_helper);
__ bind(&done);
__ Ret();
}
void ICCompareStub::GenerateSmis(MacroAssembler* masm) { void ICCompareStub::GenerateSmis(MacroAssembler* masm) {
ASSERT(state_ == CompareIC::SMIS); ASSERT(state_ == CompareIC::SMIS);
Label miss; Label miss;

View File

@ -757,11 +757,6 @@ void LCodeGen::DoCallStub(LCallStub* instr) {
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
break; break;
} }
case CodeStub::StringCharAt: {
StringCharAtStub stub;
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
break;
}
case CodeStub::NumberToString: { case CodeStub::NumberToString: {
NumberToStringStub stub; NumberToStringStub stub;
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);

View File

@ -40,7 +40,6 @@ namespace internal {
V(GenericBinaryOp) \ V(GenericBinaryOp) \
V(TypeRecordingBinaryOp) \ V(TypeRecordingBinaryOp) \
V(StringAdd) \ V(StringAdd) \
V(StringCharAt) \
V(SubString) \ V(SubString) \
V(StringCompare) \ V(StringCompare) \
V(SmiOp) \ V(SmiOp) \
@ -438,18 +437,6 @@ class MathPowStub: public CodeStub {
}; };
class StringCharAtStub: public CodeStub {
public:
StringCharAtStub() {}
private:
Major MajorKey() { return StringCharAt; }
int MinorKey() { return 0; }
void Generate(MacroAssembler* masm);
};
class ICCompareStub: public CodeStub { class ICCompareStub: public CodeStub {
public: public:
ICCompareStub(Token::Value op, CompareIC::State state) ICCompareStub(Token::Value op, CompareIC::State state)

View File

@ -6295,59 +6295,6 @@ void StringCompareStub::Generate(MacroAssembler* masm) {
} }
void StringCharAtStub::Generate(MacroAssembler* masm) {
// Expects two arguments (object, index) on the stack:
// Stack frame on entry.
// esp[0]: return address
// esp[4]: index
// esp[8]: object
Register object = ebx;
Register index = eax;
Register scratch1 = ecx;
Register scratch2 = edx;
Register result = eax;
__ pop(scratch1); // Return address.
__ pop(index);
__ pop(object);
__ push(scratch1);
Label need_conversion;
Label index_out_of_range;
Label done;
StringCharAtGenerator generator(object,
index,
scratch1,
scratch2,
result,
&need_conversion,
&need_conversion,
&index_out_of_range,
STRING_INDEX_IS_NUMBER);
generator.GenerateFast(masm);
__ jmp(&done);
__ bind(&index_out_of_range);
// When the index is out of range, the spec requires us to return
// the empty string.
__ Set(result, Immediate(Factory::empty_string()));
__ jmp(&done);
__ bind(&need_conversion);
// Move smi zero into the result register, which will trigger
// conversion.
__ Set(result, Immediate(Smi::FromInt(0)));
__ jmp(&done);
StubRuntimeCallHelper call_helper;
generator.GenerateSlow(masm, call_helper);
__ bind(&done);
__ ret(0);
}
void ICCompareStub::GenerateSmis(MacroAssembler* masm) { void ICCompareStub::GenerateSmis(MacroAssembler* masm) {
ASSERT(state_ == CompareIC::SMIS); ASSERT(state_ == CompareIC::SMIS);
NearLabel miss; NearLabel miss;

View File

@ -743,11 +743,6 @@ void LCodeGen::DoCallStub(LCallStub* instr) {
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
break; break;
} }
case CodeStub::StringCharAt: {
StringCharAtStub stub;
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
break;
}
case CodeStub::NumberToString: { case CodeStub::NumberToString: {
NumberToStringStub stub; NumberToStringStub stub;
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);

View File

@ -4909,60 +4909,6 @@ void StringCompareStub::Generate(MacroAssembler* masm) {
} }
void StringCharAtStub::Generate(MacroAssembler* masm) {
// Expects two arguments (object, index) on the stack:
// Stack frame on entry.
// rsp[0]: return address
// rsp[8]: index
// rsp[16]: object
Register object = rbx;
Register index = rax;
Register scratch1 = rcx;
Register scratch2 = rdx;
Register result = rax;
__ pop(scratch1); // Return address.
__ pop(index);
__ pop(object);
__ push(scratch1);
Label need_conversion;
Label index_out_of_range;
Label done;
StringCharAtGenerator generator(object,
index,
scratch1,
scratch2,
result,
&need_conversion,
&need_conversion,
&index_out_of_range,
STRING_INDEX_IS_NUMBER);
generator.GenerateFast(masm);
__ jmp(&done);
__ bind(&index_out_of_range);
// When the index is out of range, the spec requires us to return
// the empty string.
__ LoadRoot(result, Heap::kEmptyStringRootIndex);
__ jmp(&done);
__ bind(&need_conversion);
// Move smi zero into the result register, which will trigger
// conversion.
__ Move(result, Smi::FromInt(0));
__ jmp(&done);
StubRuntimeCallHelper call_helper;
generator.GenerateSlow(masm, call_helper);
__ bind(&done);
__ ret(0);
}
void ICCompareStub::GenerateSmis(MacroAssembler* masm) { void ICCompareStub::GenerateSmis(MacroAssembler* masm) {
ASSERT(state_ == CompareIC::SMIS); ASSERT(state_ == CompareIC::SMIS);
NearLabel miss; NearLabel miss;

View File

@ -714,11 +714,6 @@ void LCodeGen::DoCallStub(LCallStub* instr) {
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
break; break;
} }
case CodeStub::StringCharAt: {
StringCharAtStub stub;
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
break;
}
case CodeStub::NumberToString: { case CodeStub::NumberToString: {
NumberToStringStub stub; NumberToStringStub stub;
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);