Commit 32ed6291 authored by bmeurer's avatar bmeurer Committed by Commit bot

[intrinsics] Remove unused %_RegExpExec and %_NumberToString.

These intrinsics are no longer required, but their runtime call pendants
are still in use. So remove support for those from all compilers.

BUG=v8:5049
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2694623002
Cr-Commit-Position: refs/heads/master@{#43131}
parent a8758ddb
...@@ -58,8 +58,6 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) { ...@@ -58,8 +58,6 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
return ReduceFixedArrayGet(node); return ReduceFixedArrayGet(node);
case Runtime::kInlineFixedArraySet: case Runtime::kInlineFixedArraySet:
return ReduceFixedArraySet(node); return ReduceFixedArraySet(node);
case Runtime::kInlineRegExpExec:
return ReduceRegExpExec(node);
case Runtime::kInlineSubString: case Runtime::kInlineSubString:
return ReduceSubString(node); return ReduceSubString(node);
case Runtime::kInlineToInteger: case Runtime::kInlineToInteger:
...@@ -270,11 +268,6 @@ Reduction JSIntrinsicLowering::ReduceFixedArraySet(Node* node) { ...@@ -270,11 +268,6 @@ Reduction JSIntrinsicLowering::ReduceFixedArraySet(Node* node) {
} }
Reduction JSIntrinsicLowering::ReduceRegExpExec(Node* node) {
return Change(node, CodeFactory::RegExpExec(isolate()), 4);
}
Reduction JSIntrinsicLowering::ReduceSubString(Node* node) { Reduction JSIntrinsicLowering::ReduceSubString(Node* node) {
return Change(node, CodeFactory::SubString(isolate()), 3); return Change(node, CodeFactory::SubString(isolate()), 3);
} }
......
...@@ -52,7 +52,6 @@ class V8_EXPORT_PRIVATE JSIntrinsicLowering final ...@@ -52,7 +52,6 @@ class V8_EXPORT_PRIVATE JSIntrinsicLowering final
Reduction ReduceIsSmi(Node* node); Reduction ReduceIsSmi(Node* node);
Reduction ReduceFixedArrayGet(Node* node); Reduction ReduceFixedArrayGet(Node* node);
Reduction ReduceFixedArraySet(Node* node); Reduction ReduceFixedArraySet(Node* node);
Reduction ReduceRegExpExec(Node* node);
Reduction ReduceSubString(Node* node); Reduction ReduceSubString(Node* node);
Reduction ReduceToInteger(Node* node); Reduction ReduceToInteger(Node* node);
Reduction ReduceToLength(Node* node); Reduction ReduceToLength(Node* node);
......
...@@ -12128,32 +12128,6 @@ void HOptimizedGraphBuilder::GenerateSubString(CallRuntime* call) { ...@@ -12128,32 +12128,6 @@ void HOptimizedGraphBuilder::GenerateSubString(CallRuntime* call) {
return ast_context()->ReturnInstruction(result, call->id()); return ast_context()->ReturnInstruction(result, call->id());
} }
// Support for direct calls from JavaScript to native RegExp code.
void HOptimizedGraphBuilder::GenerateRegExpExec(CallRuntime* call) {
DCHECK_EQ(4, call->arguments()->length());
CHECK_ALIVE(VisitExpressions(call->arguments()));
Callable callable = CodeFactory::RegExpExec(isolate());
HValue* last_match_info = Pop();
HValue* index = Pop();
HValue* subject = Pop();
HValue* regexp_object = Pop();
HValue* stub = Add<HConstant>(callable.code());
HValue* values[] = {regexp_object, subject, index, last_match_info};
HInstruction* result = New<HCallWithDescriptor>(
stub, 0, callable.descriptor(), ArrayVector(values));
return ast_context()->ReturnInstruction(result, call->id());
}
// Fast support for number to string.
void HOptimizedGraphBuilder::GenerateNumberToString(CallRuntime* call) {
DCHECK_EQ(1, call->arguments()->length());
CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
HValue* number = Pop();
HValue* result = BuildNumberToString(number, AstType::Any());
return ast_context()->ReturnValue(result);
}
// Fast support for calls. // Fast support for calls.
void HOptimizedGraphBuilder::GenerateCall(CallRuntime* call) { void HOptimizedGraphBuilder::GenerateCall(CallRuntime* call) {
......
...@@ -2166,8 +2166,6 @@ class HOptimizedGraphBuilder : public HGraphBuilder, ...@@ -2166,8 +2166,6 @@ class HOptimizedGraphBuilder : public HGraphBuilder,
F(DebugBreakInOptimizedCode) \ F(DebugBreakInOptimizedCode) \
F(StringCharCodeAt) \ F(StringCharCodeAt) \
F(SubString) \ F(SubString) \
F(RegExpExec) \
F(NumberToString) \
F(DebugIsActive) \ F(DebugIsActive) \
/* Typed Arrays */ \ /* Typed Arrays */ \
F(TypedArrayInitialize) \ F(TypedArrayInitialize) \
......
...@@ -537,7 +537,7 @@ inherits(NumberMirror, ValueMirror); ...@@ -537,7 +537,7 @@ inherits(NumberMirror, ValueMirror);
NumberMirror.prototype.toText = function() { NumberMirror.prototype.toText = function() {
return %_NumberToString(this.value_); return %NumberToString(this.value_);
}; };
......
...@@ -561,21 +561,6 @@ void FullCodeGenerator::EmitSubString(CallRuntime* expr) { ...@@ -561,21 +561,6 @@ void FullCodeGenerator::EmitSubString(CallRuntime* expr) {
} }
void FullCodeGenerator::EmitRegExpExec(CallRuntime* expr) {
// Load the arguments on the stack and call the stub.
RegExpExecStub stub(isolate());
ZoneList<Expression*>* args = expr->arguments();
DCHECK(args->length() == 4);
VisitForStackValue(args->at(0));
VisitForStackValue(args->at(1));
VisitForStackValue(args->at(2));
VisitForStackValue(args->at(3));
__ CallStub(&stub);
OperandStackDepthDecrement(4);
context()->Plug(result_register());
}
void FullCodeGenerator::EmitIntrinsicAsStubCall(CallRuntime* expr, void FullCodeGenerator::EmitIntrinsicAsStubCall(CallRuntime* expr,
const Callable& callable) { const Callable& callable) {
ZoneList<Expression*>* args = expr->arguments(); ZoneList<Expression*>* args = expr->arguments();
...@@ -607,10 +592,6 @@ void FullCodeGenerator::EmitIntrinsicAsStubCall(CallRuntime* expr, ...@@ -607,10 +592,6 @@ void FullCodeGenerator::EmitIntrinsicAsStubCall(CallRuntime* expr,
context()->Plug(result_register()); context()->Plug(result_register());
} }
void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) {
EmitIntrinsicAsStubCall(expr, CodeFactory::NumberToString(isolate()));
}
void FullCodeGenerator::EmitToString(CallRuntime* expr) { void FullCodeGenerator::EmitToString(CallRuntime* expr) {
EmitIntrinsicAsStubCall(expr, CodeFactory::ToString(isolate())); EmitIntrinsicAsStubCall(expr, CodeFactory::ToString(isolate()));
......
...@@ -412,9 +412,7 @@ class FullCodeGenerator final : public AstVisitor<FullCodeGenerator> { ...@@ -412,9 +412,7 @@ class FullCodeGenerator final : public AstVisitor<FullCodeGenerator> {
F(ClassOf) \ F(ClassOf) \
F(StringCharCodeAt) \ F(StringCharCodeAt) \
F(SubString) \ F(SubString) \
F(RegExpExec) \
F(ToInteger) \ F(ToInteger) \
F(NumberToString) \
F(ToString) \ F(ToString) \
F(ToLength) \ F(ToLength) \
F(ToNumber) \ F(ToNumber) \
......
...@@ -242,18 +242,6 @@ Node* IntrinsicsHelper::HasProperty(Node* input, Node* arg_count, ...@@ -242,18 +242,6 @@ Node* IntrinsicsHelper::HasProperty(Node* input, Node* arg_count,
CodeFactory::HasProperty(isolate())); CodeFactory::HasProperty(isolate()));
} }
Node* IntrinsicsHelper::NumberToString(Node* input, Node* arg_count,
Node* context) {
return IntrinsicAsStubCall(input, context,
CodeFactory::NumberToString(isolate()));
}
Node* IntrinsicsHelper::RegExpExec(Node* input, Node* arg_count,
Node* context) {
return IntrinsicAsStubCall(input, context,
CodeFactory::RegExpExec(isolate()));
}
Node* IntrinsicsHelper::SubString(Node* input, Node* arg_count, Node* context) { Node* IntrinsicsHelper::SubString(Node* input, Node* arg_count, Node* context) {
return IntrinsicAsStubCall(input, context, CodeFactory::SubString(isolate())); return IntrinsicAsStubCall(input, context, CodeFactory::SubString(isolate()));
} }
......
...@@ -33,8 +33,6 @@ namespace interpreter { ...@@ -33,8 +33,6 @@ namespace interpreter {
V(IsJSReceiver, is_js_receiver, 1) \ V(IsJSReceiver, is_js_receiver, 1) \
V(IsSmi, is_smi, 1) \ V(IsSmi, is_smi, 1) \
V(IsTypedArray, is_typed_array, 1) \ V(IsTypedArray, is_typed_array, 1) \
V(NumberToString, number_to_string, 1) \
V(RegExpExec, reg_exp_exec, 4) \
V(SubString, sub_string, 3) \ V(SubString, sub_string, 3) \
V(ToString, to_string, 1) \ V(ToString, to_string, 1) \
V(ToLength, to_length, 1) \ V(ToLength, to_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