Commit 01df85e2 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[compiler] Remove dead CreateScriptContext

Bug: 
Change-Id: I4577db5ae6b9623815969deb03b311bd3b550d75
Reviewed-on: https://chromium-review.googlesource.com/787310Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49602}
parent 7a24b613
...@@ -520,12 +520,6 @@ void JSGenericLowering::LowerJSCreateBlockContext(Node* node) { ...@@ -520,12 +520,6 @@ void JSGenericLowering::LowerJSCreateBlockContext(Node* node) {
} }
void JSGenericLowering::LowerJSCreateScriptContext(Node* node) {
Handle<ScopeInfo> scope_info = OpParameter<Handle<ScopeInfo>>(node);
node->InsertInput(zone(), 1, jsgraph()->HeapConstant(scope_info));
ReplaceWithRuntimeCall(node, Runtime::kNewScriptContext);
}
void JSGenericLowering::LowerJSConstructForwardVarargs(Node* node) { void JSGenericLowering::LowerJSConstructForwardVarargs(Node* node) {
ConstructForwardVarargsParameters p = ConstructForwardVarargsParameters p =
ConstructForwardVarargsParametersOf(node->op()); ConstructForwardVarargsParametersOf(node->op());
......
...@@ -1165,15 +1165,6 @@ const Operator* JSOperatorBuilder::CreateBlockContext( ...@@ -1165,15 +1165,6 @@ const Operator* JSOperatorBuilder::CreateBlockContext(
scope_info); // parameter scope_info); // parameter
} }
const Operator* JSOperatorBuilder::CreateScriptContext(
const Handle<ScopeInfo>& scope_info) {
return new (zone()) Operator1<Handle<ScopeInfo>>( // --
IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode
"JSCreateScriptContext", // name
1, 1, 1, 1, 1, 2, // counts
scope_info); // parameter
}
} // namespace compiler } // namespace compiler
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
...@@ -769,7 +769,6 @@ class V8_EXPORT_PRIVATE JSOperatorBuilder final ...@@ -769,7 +769,6 @@ class V8_EXPORT_PRIVATE JSOperatorBuilder final
const Handle<ScopeInfo>& scope_info); const Handle<ScopeInfo>& scope_info);
const Operator* CreateWithContext(const Handle<ScopeInfo>& scope_info); const Operator* CreateWithContext(const Handle<ScopeInfo>& scope_info);
const Operator* CreateBlockContext(const Handle<ScopeInfo>& scpope_info); const Operator* CreateBlockContext(const Handle<ScopeInfo>& scpope_info);
const Operator* CreateScriptContext(const Handle<ScopeInfo>& scpope_info);
private: private:
Zone* zone() const { return zone_; } Zone* zone() const { return zone_; }
......
...@@ -161,8 +161,7 @@ ...@@ -161,8 +161,7 @@
V(JSCreateFunctionContext) \ V(JSCreateFunctionContext) \
V(JSCreateCatchContext) \ V(JSCreateCatchContext) \
V(JSCreateWithContext) \ V(JSCreateWithContext) \
V(JSCreateBlockContext) \ V(JSCreateBlockContext)
V(JSCreateScriptContext)
#define JS_OTHER_OP_LIST(V) \ #define JS_OTHER_OP_LIST(V) \
V(JSConstructForwardVarargs) \ V(JSConstructForwardVarargs) \
...@@ -826,7 +825,7 @@ class V8_EXPORT_PRIVATE IrOpcode { ...@@ -826,7 +825,7 @@ class V8_EXPORT_PRIVATE IrOpcode {
} }
static bool IsContextChainExtendingOpcode(Value value) { static bool IsContextChainExtendingOpcode(Value value) {
return kJSCreateFunctionContext <= value && value <= kJSCreateScriptContext; return kJSCreateFunctionContext <= value && value <= kJSCreateBlockContext;
} }
}; };
......
...@@ -85,9 +85,6 @@ bool OperatorProperties::HasFrameStateInput(const Operator* op) { ...@@ -85,9 +85,6 @@ bool OperatorProperties::HasFrameStateInput(const Operator* op) {
case IrOpcode::kJSStoreDataPropertyInLiteral: case IrOpcode::kJSStoreDataPropertyInLiteral:
case IrOpcode::kJSDeleteProperty: case IrOpcode::kJSDeleteProperty:
// Context operations
case IrOpcode::kJSCreateScriptContext:
// Conversions // Conversions
case IrOpcode::kJSToInteger: case IrOpcode::kJSToInteger:
case IrOpcode::kJSToLength: case IrOpcode::kJSToLength:
......
...@@ -1380,10 +1380,6 @@ Type* Typer::Visitor::TypeJSCreateBlockContext(Node* node) { ...@@ -1380,10 +1380,6 @@ Type* Typer::Visitor::TypeJSCreateBlockContext(Node* node) {
return Type::OtherInternal(); return Type::OtherInternal();
} }
Type* Typer::Visitor::TypeJSCreateScriptContext(Node* node) {
return Type::OtherInternal();
}
// JS other operators. // JS other operators.
Type* Typer::Visitor::TypeJSConstructForwardVarargs(Node* node) { Type* Typer::Visitor::TypeJSConstructForwardVarargs(Node* node) {
......
...@@ -766,8 +766,7 @@ void Verifier::Visitor::Check(Node* node, const AllNodes& all) { ...@@ -766,8 +766,7 @@ void Verifier::Visitor::Check(Node* node, const AllNodes& all) {
case IrOpcode::kJSCreateFunctionContext: case IrOpcode::kJSCreateFunctionContext:
case IrOpcode::kJSCreateCatchContext: case IrOpcode::kJSCreateCatchContext:
case IrOpcode::kJSCreateWithContext: case IrOpcode::kJSCreateWithContext:
case IrOpcode::kJSCreateBlockContext: case IrOpcode::kJSCreateBlockContext: {
case IrOpcode::kJSCreateScriptContext: {
// Type is Context, and operand is Internal. // Type is Context, and operand is Internal.
Node* context = NodeProperties::GetContextInput(node); Node* context = NodeProperties::GetContextInput(node);
// TODO(bmeurer): This should say CheckTypeIs, but we don't have type // TODO(bmeurer): This should say CheckTypeIs, but we don't have type
......
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