[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}
This commit is contained in:
parent
a8758ddb5c
commit
32ed62911f
@ -58,8 +58,6 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
|
||||
return ReduceFixedArrayGet(node);
|
||||
case Runtime::kInlineFixedArraySet:
|
||||
return ReduceFixedArraySet(node);
|
||||
case Runtime::kInlineRegExpExec:
|
||||
return ReduceRegExpExec(node);
|
||||
case Runtime::kInlineSubString:
|
||||
return ReduceSubString(node);
|
||||
case Runtime::kInlineToInteger:
|
||||
@ -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) {
|
||||
return Change(node, CodeFactory::SubString(isolate()), 3);
|
||||
}
|
||||
|
@ -52,7 +52,6 @@ class V8_EXPORT_PRIVATE JSIntrinsicLowering final
|
||||
Reduction ReduceIsSmi(Node* node);
|
||||
Reduction ReduceFixedArrayGet(Node* node);
|
||||
Reduction ReduceFixedArraySet(Node* node);
|
||||
Reduction ReduceRegExpExec(Node* node);
|
||||
Reduction ReduceSubString(Node* node);
|
||||
Reduction ReduceToInteger(Node* node);
|
||||
Reduction ReduceToLength(Node* node);
|
||||
|
@ -12128,32 +12128,6 @@ void HOptimizedGraphBuilder::GenerateSubString(CallRuntime* call) {
|
||||
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.
|
||||
void HOptimizedGraphBuilder::GenerateCall(CallRuntime* call) {
|
||||
|
@ -2166,8 +2166,6 @@ class HOptimizedGraphBuilder : public HGraphBuilder,
|
||||
F(DebugBreakInOptimizedCode) \
|
||||
F(StringCharCodeAt) \
|
||||
F(SubString) \
|
||||
F(RegExpExec) \
|
||||
F(NumberToString) \
|
||||
F(DebugIsActive) \
|
||||
/* Typed Arrays */ \
|
||||
F(TypedArrayInitialize) \
|
||||
|
@ -537,7 +537,7 @@ inherits(NumberMirror, ValueMirror);
|
||||
|
||||
|
||||
NumberMirror.prototype.toText = function() {
|
||||
return %_NumberToString(this.value_);
|
||||
return %NumberToString(this.value_);
|
||||
};
|
||||
|
||||
|
||||
|
@ -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,
|
||||
const Callable& callable) {
|
||||
ZoneList<Expression*>* args = expr->arguments();
|
||||
@ -607,10 +592,6 @@ void FullCodeGenerator::EmitIntrinsicAsStubCall(CallRuntime* expr,
|
||||
context()->Plug(result_register());
|
||||
}
|
||||
|
||||
void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) {
|
||||
EmitIntrinsicAsStubCall(expr, CodeFactory::NumberToString(isolate()));
|
||||
}
|
||||
|
||||
|
||||
void FullCodeGenerator::EmitToString(CallRuntime* expr) {
|
||||
EmitIntrinsicAsStubCall(expr, CodeFactory::ToString(isolate()));
|
||||
|
@ -412,9 +412,7 @@ class FullCodeGenerator final : public AstVisitor<FullCodeGenerator> {
|
||||
F(ClassOf) \
|
||||
F(StringCharCodeAt) \
|
||||
F(SubString) \
|
||||
F(RegExpExec) \
|
||||
F(ToInteger) \
|
||||
F(NumberToString) \
|
||||
F(ToString) \
|
||||
F(ToLength) \
|
||||
F(ToNumber) \
|
||||
|
@ -242,18 +242,6 @@ Node* IntrinsicsHelper::HasProperty(Node* input, Node* arg_count,
|
||||
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) {
|
||||
return IntrinsicAsStubCall(input, context, CodeFactory::SubString(isolate()));
|
||||
}
|
||||
|
@ -33,8 +33,6 @@ namespace interpreter {
|
||||
V(IsJSReceiver, is_js_receiver, 1) \
|
||||
V(IsSmi, is_smi, 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(ToString, to_string, 1) \
|
||||
V(ToLength, to_length, 1) \
|
||||
|
Loading…
Reference in New Issue
Block a user