Commit 132b7bf9 authored by jgruber's avatar jgruber Committed by Commit bot

[stubs] Remove %_NewObject intrinsic

The last remaining JS user of this in promise.js has recently been moved
to TF. The underlying FastObjectStub is still in use.

BUG=

Review-Url: https://codereview.chromium.org/2598973002
Cr-Commit-Position: refs/heads/master@{#41919}
parent 8dad4fee
......@@ -72,8 +72,6 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
return ReduceToString(node);
case Runtime::kInlineCall:
return ReduceCall(node);
case Runtime::kInlineNewObject:
return ReduceNewObject(node);
case Runtime::kInlineGetSuperConstructor:
return ReduceGetSuperConstructor(node);
default:
......@@ -288,10 +286,6 @@ Reduction JSIntrinsicLowering::ReduceCall(Node* node) {
return Changed(node);
}
Reduction JSIntrinsicLowering::ReduceNewObject(Node* node) {
return Change(node, CodeFactory::FastNewObject(isolate()), 0);
}
Reduction JSIntrinsicLowering::ReduceGetSuperConstructor(Node* node) {
Node* active_function = NodeProperties::GetValueInput(node, 0);
Node* effect = NodeProperties::GetEffectInput(node);
......
......@@ -58,7 +58,6 @@ class V8_EXPORT_PRIVATE JSIntrinsicLowering final
Reduction ReduceToObject(Node* node);
Reduction ReduceToString(Node* node);
Reduction ReduceCall(Node* node);
Reduction ReduceNewObject(Node* node);
Reduction ReduceGetSuperConstructor(Node* node);
Reduction Change(Node* node, const Operator* op);
......
......@@ -12101,19 +12101,6 @@ void HOptimizedGraphBuilder::GenerateSubString(CallRuntime* call) {
return ast_context()->ReturnInstruction(result, call->id());
}
// Support for direct creation of new objects.
void HOptimizedGraphBuilder::GenerateNewObject(CallRuntime* call) {
DCHECK_EQ(2, call->arguments()->length());
CHECK_ALIVE(VisitExpressions(call->arguments()));
FastNewObjectStub stub(isolate());
FastNewObjectDescriptor descriptor(isolate());
HValue* values[] = {Pop(), Pop()};
HConstant* stub_value = Add<HConstant>(stub.GetCode());
HInstruction* result =
New<HCallWithDescriptor>(stub_value, 0, descriptor, ArrayVector(values));
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());
......
......@@ -2159,7 +2159,6 @@ class HOptimizedGraphBuilder : public HGraphBuilder,
F(IsRegExp) \
F(IsJSProxy) \
F(Call) \
F(NewObject) \
F(ToInteger) \
F(ToObject) \
F(ToString) \
......
......@@ -606,10 +606,6 @@ void FullCodeGenerator::EmitIntrinsicAsStubCall(CallRuntime* expr,
context()->Plug(result_register());
}
void FullCodeGenerator::EmitNewObject(CallRuntime* expr) {
EmitIntrinsicAsStubCall(expr, CodeFactory::FastNewObject(isolate()));
}
void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) {
EmitIntrinsicAsStubCall(expr, CodeFactory::NumberToString(isolate()));
}
......
......@@ -405,7 +405,6 @@ class FullCodeGenerator final : public AstVisitor<FullCodeGenerator> {
F(IsRegExp) \
F(IsJSProxy) \
F(Call) \
F(NewObject) \
F(IsJSReceiver) \
F(GetSuperConstructor) \
F(DebugBreakInOptimizedCode) \
......
......@@ -240,11 +240,6 @@ Node* IntrinsicsHelper::HasProperty(Node* input, Node* arg_count,
CodeFactory::HasProperty(isolate()));
}
Node* IntrinsicsHelper::NewObject(Node* input, Node* arg_count, Node* context) {
return IntrinsicAsStubCall(input, context,
CodeFactory::FastNewObject(isolate()));
}
Node* IntrinsicsHelper::NumberToString(Node* input, Node* arg_count,
Node* context) {
return IntrinsicAsStubCall(input, context,
......
......@@ -33,7 +33,6 @@ namespace interpreter {
V(IsRegExp, is_regexp, 1) \
V(IsSmi, is_smi, 1) \
V(IsTypedArray, is_typed_array, 1) \
V(NewObject, new_object, 2) \
V(NumberToString, number_to_string, 1) \
V(RegExpExec, reg_exp_exec, 4) \
V(SubString, sub_string, 3) \
......
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