Commit 253edf24 authored by jochen@chromium.org's avatar jochen@chromium.org

Remove IsRegExpEquivalent.

It's not used anywhere.

BUG=none
R=ulan@chromium.org
LOG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18995 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 75bc1d56
......@@ -3814,47 +3814,6 @@ void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) {
}
void FullCodeGenerator::EmitIsRegExpEquivalent(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
ASSERT_EQ(2, args->length());
Register right = r0;
Register left = r1;
Register tmp = r2;
Register tmp2 = r3;
VisitForStackValue(args->at(0));
VisitForAccumulatorValue(args->at(1));
__ pop(left);
Label done, fail, ok;
__ cmp(left, Operand(right));
__ b(eq, &ok);
// Fail if either is a non-HeapObject.
__ and_(tmp, left, Operand(right));
__ JumpIfSmi(tmp, &fail);
__ ldr(tmp, FieldMemOperand(left, HeapObject::kMapOffset));
__ ldrb(tmp2, FieldMemOperand(tmp, Map::kInstanceTypeOffset));
__ cmp(tmp2, Operand(JS_REGEXP_TYPE));
__ b(ne, &fail);
__ ldr(tmp2, FieldMemOperand(right, HeapObject::kMapOffset));
__ cmp(tmp, Operand(tmp2));
__ b(ne, &fail);
__ ldr(tmp, FieldMemOperand(left, JSRegExp::kDataOffset));
__ ldr(tmp2, FieldMemOperand(right, JSRegExp::kDataOffset));
__ cmp(tmp, tmp2);
__ b(eq, &ok);
__ bind(&fail);
__ LoadRoot(r0, Heap::kFalseValueRootIndex);
__ jmp(&done);
__ bind(&ok);
__ LoadRoot(r0, Heap::kTrueValueRootIndex);
__ bind(&done);
context()->Plug(r0);
}
void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
VisitForAccumulatorValue(args->at(0));
......
......@@ -10813,12 +10813,6 @@ void HOptimizedGraphBuilder::GenerateMathSqrt(CallRuntime* call) {
}
// Check whether two RegExps are equivalent
void HOptimizedGraphBuilder::GenerateIsRegExpEquivalent(CallRuntime* call) {
return Bailout(kInlinedRuntimeFunctionIsRegExpEquivalent);
}
void HOptimizedGraphBuilder::GenerateGetCachedArrayIndex(CallRuntime* call) {
ASSERT(call->arguments()->length() == 1);
CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
......
......@@ -3777,44 +3777,6 @@ void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) {
}
void FullCodeGenerator::EmitIsRegExpEquivalent(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
ASSERT_EQ(2, args->length());
Register right = eax;
Register left = ebx;
Register tmp = ecx;
VisitForStackValue(args->at(0));
VisitForAccumulatorValue(args->at(1));
__ pop(left);
Label done, fail, ok;
__ cmp(left, right);
__ j(equal, &ok);
// Fail if either is a non-HeapObject.
__ mov(tmp, left);
__ and_(tmp, right);
__ JumpIfSmi(tmp, &fail);
__ mov(tmp, FieldOperand(left, HeapObject::kMapOffset));
__ CmpInstanceType(tmp, JS_REGEXP_TYPE);
__ j(not_equal, &fail);
__ cmp(tmp, FieldOperand(right, HeapObject::kMapOffset));
__ j(not_equal, &fail);
__ mov(tmp, FieldOperand(left, JSRegExp::kDataOffset));
__ cmp(tmp, FieldOperand(right, JSRegExp::kDataOffset));
__ j(equal, &ok);
__ bind(&fail);
__ mov(eax, Immediate(isolate()->factory()->false_value()));
__ jmp(&done);
__ bind(&ok);
__ mov(eax, Immediate(isolate()->factory()->true_value()));
__ bind(&done);
context()->Plug(eax);
}
void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
ASSERT(args->length() == 1);
......
......@@ -3877,43 +3877,6 @@ void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) {
}
void FullCodeGenerator::EmitIsRegExpEquivalent(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
ASSERT_EQ(2, args->length());
Register right = v0;
Register left = a1;
Register tmp = a2;
Register tmp2 = a3;
VisitForStackValue(args->at(0));
VisitForAccumulatorValue(args->at(1)); // Result (right) in v0.
__ pop(left);
Label done, fail, ok;
__ Branch(&ok, eq, left, Operand(right));
// Fail if either is a non-HeapObject.
__ And(tmp, left, Operand(right));
__ JumpIfSmi(tmp, &fail);
__ lw(tmp, FieldMemOperand(left, HeapObject::kMapOffset));
__ lbu(tmp2, FieldMemOperand(tmp, Map::kInstanceTypeOffset));
__ Branch(&fail, ne, tmp2, Operand(JS_REGEXP_TYPE));
__ lw(tmp2, FieldMemOperand(right, HeapObject::kMapOffset));
__ Branch(&fail, ne, tmp, Operand(tmp2));
__ lw(tmp, FieldMemOperand(left, JSRegExp::kDataOffset));
__ lw(tmp2, FieldMemOperand(right, JSRegExp::kDataOffset));
__ Branch(&ok, eq, tmp, Operand(tmp2));
__ bind(&fail);
__ LoadRoot(v0, Heap::kFalseValueRootIndex);
__ jmp(&done);
__ bind(&ok);
__ LoadRoot(v0, Heap::kTrueValueRootIndex);
__ bind(&done);
context()->Plug(v0);
}
void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
VisitForAccumulatorValue(args->at(0));
......
......@@ -1192,8 +1192,6 @@ class MaybeObject BASE_EMBEDDED {
"Inlined runtime function: GetFromCache") \
V(kInlinedRuntimeFunctionIsNonNegativeSmi, \
"Inlined runtime function: IsNonNegativeSmi") \
V(kInlinedRuntimeFunctionIsRegExpEquivalent, \
"Inlined runtime function: IsRegExpEquivalent") \
V(kInlinedRuntimeFunctionIsStringWrapperSafeForDefaultValueOf, \
"Inlined runtime function: IsStringWrapperSafeForDefaultValueOf") \
V(kInliningBailedOut, "Inlining bailed out") \
......
......@@ -634,7 +634,6 @@ namespace internal {
F(MathSqrt, 1, 1) \
F(MathLog, 1, 1) \
F(IsMinusZero, 1, 1) \
F(IsRegExpEquivalent, 2, 1) \
F(HasCachedArrayIndex, 1, 1) \
F(GetCachedArrayIndex, 1, 1) \
F(FastAsciiArrayJoin, 2, 1) \
......
......@@ -3758,45 +3758,6 @@ void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) {
}
void FullCodeGenerator::EmitIsRegExpEquivalent(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
ASSERT_EQ(2, args->length());
Register right = rax;
Register left = rbx;
Register tmp = rcx;
VisitForStackValue(args->at(0));
VisitForAccumulatorValue(args->at(1));
__ pop(left);
Label done, fail, ok;
__ cmpq(left, right);
__ j(equal, &ok, Label::kNear);
// Fail if either is a non-HeapObject.
Condition either_smi = masm()->CheckEitherSmi(left, right, tmp);
__ j(either_smi, &fail, Label::kNear);
__ j(zero, &fail, Label::kNear);
__ movp(tmp, FieldOperand(left, HeapObject::kMapOffset));
__ cmpb(FieldOperand(tmp, Map::kInstanceTypeOffset),
Immediate(JS_REGEXP_TYPE));
__ j(not_equal, &fail, Label::kNear);
__ cmpq(tmp, FieldOperand(right, HeapObject::kMapOffset));
__ j(not_equal, &fail, Label::kNear);
__ movp(tmp, FieldOperand(left, JSRegExp::kDataOffset));
__ cmpq(tmp, FieldOperand(right, JSRegExp::kDataOffset));
__ j(equal, &ok, Label::kNear);
__ bind(&fail);
__ Move(rax, isolate()->factory()->false_value());
__ jmp(&done, Label::kNear);
__ bind(&ok);
__ Move(rax, isolate()->factory()->true_value());
__ bind(&done);
context()->Plug(rax);
}
void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
ASSERT(args->length() == 1);
......
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