[crankshaft] Remove the useless HAllocateBlockContext instruction.
It's dead^Wa runtime call Jim! R=jarin@chromium.org Review URL: https://codereview.chromium.org/1702313002 Cr-Commit-Position: refs/heads/master@{#34077}
This commit is contained in:
parent
ed29651bc9
commit
e80279c02b
@ -2601,15 +2601,5 @@ LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) {
|
||||
return new(zone()) LStoreFrameContext(context);
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoAllocateBlockContext(
|
||||
HAllocateBlockContext* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* function = UseRegisterAtStart(instr->function());
|
||||
LAllocateBlockContext* result =
|
||||
new(zone()) LAllocateBlockContext(context, function);
|
||||
return MarkAsCall(DefineFixed(result, cp), instr);
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
@ -21,7 +21,6 @@ class LCodeGen;
|
||||
V(AccessArgumentsAt) \
|
||||
V(AddI) \
|
||||
V(Allocate) \
|
||||
V(AllocateBlockContext) \
|
||||
V(ApplyArguments) \
|
||||
V(ArgumentsElements) \
|
||||
V(ArgumentsLength) \
|
||||
@ -2568,23 +2567,6 @@ class LStoreFrameContext: public LTemplateInstruction<0, 1, 0> {
|
||||
};
|
||||
|
||||
|
||||
class LAllocateBlockContext: public LTemplateInstruction<1, 2, 0> {
|
||||
public:
|
||||
LAllocateBlockContext(LOperand* context, LOperand* function) {
|
||||
inputs_[0] = context;
|
||||
inputs_[1] = function;
|
||||
}
|
||||
|
||||
LOperand* context() { return inputs_[0]; }
|
||||
LOperand* function() { return inputs_[1]; }
|
||||
|
||||
Handle<ScopeInfo> scope_info() { return hydrogen()->scope_info(); }
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(AllocateBlockContext, "allocate-block-context")
|
||||
DECLARE_HYDROGEN_ACCESSOR(AllocateBlockContext)
|
||||
};
|
||||
|
||||
|
||||
class LChunkBuilder;
|
||||
class LPlatformChunk final : public LChunk {
|
||||
public:
|
||||
|
@ -5529,15 +5529,6 @@ void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) {
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) {
|
||||
Handle<ScopeInfo> scope_info = instr->scope_info();
|
||||
__ Push(scope_info);
|
||||
__ push(ToRegister(instr->function()));
|
||||
CallRuntime(Runtime::kPushBlockContext, instr);
|
||||
RecordSafepoint(Safepoint::kNoLazyDeopt);
|
||||
}
|
||||
|
||||
|
||||
#undef __
|
||||
|
||||
} // namespace internal
|
||||
|
@ -2698,15 +2698,5 @@ LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) {
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoAllocateBlockContext(
|
||||
HAllocateBlockContext* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* function = UseRegisterAtStart(instr->function());
|
||||
LAllocateBlockContext* result =
|
||||
new(zone()) LAllocateBlockContext(context, function);
|
||||
return MarkAsCall(DefineFixed(result, cp), instr);
|
||||
}
|
||||
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
@ -23,7 +23,6 @@ class LCodeGen;
|
||||
V(AddI) \
|
||||
V(AddS) \
|
||||
V(Allocate) \
|
||||
V(AllocateBlockContext) \
|
||||
V(ApplyArguments) \
|
||||
V(ArgumentsElements) \
|
||||
V(ArgumentsLength) \
|
||||
@ -2901,23 +2900,6 @@ class LStoreFrameContext: public LTemplateInstruction<0, 1, 0> {
|
||||
};
|
||||
|
||||
|
||||
class LAllocateBlockContext: public LTemplateInstruction<1, 2, 0> {
|
||||
public:
|
||||
LAllocateBlockContext(LOperand* context, LOperand* function) {
|
||||
inputs_[0] = context;
|
||||
inputs_[1] = function;
|
||||
}
|
||||
|
||||
LOperand* context() { return inputs_[0]; }
|
||||
LOperand* function() { return inputs_[1]; }
|
||||
|
||||
Handle<ScopeInfo> scope_info() { return hydrogen()->scope_info(); }
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(AllocateBlockContext, "allocate-block-context")
|
||||
DECLARE_HYDROGEN_ACCESSOR(AllocateBlockContext)
|
||||
};
|
||||
|
||||
|
||||
class LWrapReceiver final : public LTemplateInstruction<1, 2, 0> {
|
||||
public:
|
||||
LWrapReceiver(LOperand* receiver, LOperand* function) {
|
||||
|
@ -5715,14 +5715,5 @@ void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) {
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) {
|
||||
Handle<ScopeInfo> scope_info = instr->scope_info();
|
||||
__ Push(scope_info);
|
||||
__ Push(ToRegister(instr->function()));
|
||||
CallRuntime(Runtime::kPushBlockContext, instr);
|
||||
RecordSafepoint(Safepoint::kNoLazyDeopt);
|
||||
}
|
||||
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
@ -828,7 +828,6 @@ bool HInstruction::CanDeoptimize() {
|
||||
return false;
|
||||
|
||||
case HValue::kAdd:
|
||||
case HValue::kAllocateBlockContext:
|
||||
case HValue::kApplyArguments:
|
||||
case HValue::kBitwise:
|
||||
case HValue::kBoundsCheck:
|
||||
@ -1103,12 +1102,6 @@ std::ostream& HAccessArgumentsAt::PrintDataTo(
|
||||
}
|
||||
|
||||
|
||||
std::ostream& HAllocateBlockContext::PrintDataTo(
|
||||
std::ostream& os) const { // NOLINT
|
||||
return os << NameOf(context()) << " " << NameOf(function());
|
||||
}
|
||||
|
||||
|
||||
std::ostream& HControlInstruction::PrintDataTo(
|
||||
std::ostream& os) const { // NOLINT
|
||||
os << " goto (";
|
||||
|
@ -48,7 +48,6 @@ class LChunkBuilder;
|
||||
V(AbnormalExit) \
|
||||
V(AccessArgumentsAt) \
|
||||
V(Add) \
|
||||
V(AllocateBlockContext) \
|
||||
V(Allocate) \
|
||||
V(ApplyArguments) \
|
||||
V(ArgumentsElements) \
|
||||
@ -7668,36 +7667,6 @@ class HStoreFrameContext: public HUnaryOperation {
|
||||
};
|
||||
|
||||
|
||||
class HAllocateBlockContext: public HTemplateInstruction<2> {
|
||||
public:
|
||||
DECLARE_INSTRUCTION_FACTORY_P3(HAllocateBlockContext, HValue*,
|
||||
HValue*, Handle<ScopeInfo>);
|
||||
HValue* context() const { return OperandAt(0); }
|
||||
HValue* function() const { return OperandAt(1); }
|
||||
Handle<ScopeInfo> scope_info() const { return scope_info_; }
|
||||
|
||||
Representation RequiredInputRepresentation(int index) override {
|
||||
return Representation::Tagged();
|
||||
}
|
||||
|
||||
std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(AllocateBlockContext)
|
||||
|
||||
private:
|
||||
HAllocateBlockContext(HValue* context,
|
||||
HValue* function,
|
||||
Handle<ScopeInfo> scope_info)
|
||||
: scope_info_(scope_info) {
|
||||
SetOperandAt(0, context);
|
||||
SetOperandAt(1, function);
|
||||
set_representation(Representation::Tagged());
|
||||
}
|
||||
|
||||
Handle<ScopeInfo> scope_info_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#undef DECLARE_INSTRUCTION
|
||||
#undef DECLARE_CONCRETE_INSTRUCTION
|
||||
|
@ -4735,8 +4735,11 @@ void HOptimizedGraphBuilder::VisitBlock(Block* stmt) {
|
||||
}
|
||||
AddInstruction(function);
|
||||
// Allocate a block context and store it to the stack frame.
|
||||
HInstruction* inner_context = Add<HAllocateBlockContext>(
|
||||
outer_context, function, scope->GetScopeInfo(isolate()));
|
||||
HValue* scope_info = Add<HConstant>(scope->GetScopeInfo(isolate()));
|
||||
Add<HPushArguments>(scope_info, function);
|
||||
HInstruction* inner_context = Add<HCallRuntime>(
|
||||
Runtime::FunctionForId(Runtime::kPushBlockContext), 2);
|
||||
inner_context->SetFlag(HValue::kHasNoObservableSideEffects);
|
||||
HInstruction* instr = Add<HStoreFrameContext>(inner_context);
|
||||
set_scope(scope);
|
||||
environment()->BindContext(inner_context);
|
||||
|
@ -5394,15 +5394,6 @@ void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) {
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) {
|
||||
Handle<ScopeInfo> scope_info = instr->scope_info();
|
||||
__ Push(scope_info);
|
||||
__ push(ToRegister(instr->function()));
|
||||
CallRuntime(Runtime::kPushBlockContext, instr);
|
||||
RecordSafepoint(Safepoint::kNoLazyDeopt);
|
||||
}
|
||||
|
||||
|
||||
#undef __
|
||||
|
||||
} // namespace internal
|
||||
|
@ -2666,16 +2666,6 @@ LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) {
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoAllocateBlockContext(
|
||||
HAllocateBlockContext* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), esi);
|
||||
LOperand* function = UseRegisterAtStart(instr->function());
|
||||
LAllocateBlockContext* result =
|
||||
new(zone()) LAllocateBlockContext(context, function);
|
||||
return MarkAsCall(DefineFixed(result, esi), instr);
|
||||
}
|
||||
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
||||
|
@ -24,7 +24,6 @@ class LCodeGen;
|
||||
#define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \
|
||||
V(AccessArgumentsAt) \
|
||||
V(AddI) \
|
||||
V(AllocateBlockContext) \
|
||||
V(Allocate) \
|
||||
V(ApplyArguments) \
|
||||
V(ArgumentsElements) \
|
||||
@ -2555,23 +2554,6 @@ class LStoreFrameContext: public LTemplateInstruction<0, 1, 0> {
|
||||
};
|
||||
|
||||
|
||||
class LAllocateBlockContext: public LTemplateInstruction<1, 2, 0> {
|
||||
public:
|
||||
LAllocateBlockContext(LOperand* context, LOperand* function) {
|
||||
inputs_[0] = context;
|
||||
inputs_[1] = function;
|
||||
}
|
||||
|
||||
LOperand* context() { return inputs_[0]; }
|
||||
LOperand* function() { return inputs_[1]; }
|
||||
|
||||
Handle<ScopeInfo> scope_info() { return hydrogen()->scope_info(); }
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(AllocateBlockContext, "allocate-block-context")
|
||||
DECLARE_HYDROGEN_ACCESSOR(AllocateBlockContext)
|
||||
};
|
||||
|
||||
|
||||
class LChunkBuilder;
|
||||
class LPlatformChunk final : public LChunk {
|
||||
public:
|
||||
|
@ -5547,15 +5547,6 @@ void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) {
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) {
|
||||
Handle<ScopeInfo> scope_info = instr->scope_info();
|
||||
__ li(at, scope_info);
|
||||
__ Push(at, ToRegister(instr->function()));
|
||||
CallRuntime(Runtime::kPushBlockContext, instr);
|
||||
RecordSafepoint(Safepoint::kNoLazyDeopt);
|
||||
}
|
||||
|
||||
|
||||
#undef __
|
||||
|
||||
} // namespace internal
|
||||
|
@ -2549,16 +2549,6 @@ LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) {
|
||||
return new(zone()) LStoreFrameContext(context);
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoAllocateBlockContext(
|
||||
HAllocateBlockContext* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* function = UseRegisterAtStart(instr->function());
|
||||
LAllocateBlockContext* result =
|
||||
new(zone()) LAllocateBlockContext(context, function);
|
||||
return MarkAsCall(DefineFixed(result, cp), instr);
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
||||
|
@ -21,7 +21,6 @@ class LCodeGen;
|
||||
V(AccessArgumentsAt) \
|
||||
V(AddI) \
|
||||
V(Allocate) \
|
||||
V(AllocateBlockContext) \
|
||||
V(ApplyArguments) \
|
||||
V(ArgumentsElements) \
|
||||
V(ArgumentsLength) \
|
||||
@ -2527,23 +2526,6 @@ class LStoreFrameContext: public LTemplateInstruction<0, 1, 0> {
|
||||
};
|
||||
|
||||
|
||||
class LAllocateBlockContext: public LTemplateInstruction<1, 2, 0> {
|
||||
public:
|
||||
LAllocateBlockContext(LOperand* context, LOperand* function) {
|
||||
inputs_[0] = context;
|
||||
inputs_[1] = function;
|
||||
}
|
||||
|
||||
LOperand* context() { return inputs_[0]; }
|
||||
LOperand* function() { return inputs_[1]; }
|
||||
|
||||
Handle<ScopeInfo> scope_info() { return hydrogen()->scope_info(); }
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(AllocateBlockContext, "allocate-block-context")
|
||||
DECLARE_HYDROGEN_ACCESSOR(AllocateBlockContext)
|
||||
};
|
||||
|
||||
|
||||
class LChunkBuilder;
|
||||
class LPlatformChunk final : public LChunk {
|
||||
public:
|
||||
|
@ -5751,15 +5751,6 @@ void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) {
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) {
|
||||
Handle<ScopeInfo> scope_info = instr->scope_info();
|
||||
__ li(at, scope_info);
|
||||
__ Push(at, ToRegister(instr->function()));
|
||||
CallRuntime(Runtime::kPushBlockContext, instr);
|
||||
RecordSafepoint(Safepoint::kNoLazyDeopt);
|
||||
}
|
||||
|
||||
|
||||
#undef __
|
||||
|
||||
} // namespace internal
|
||||
|
@ -2554,16 +2554,6 @@ LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) {
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoAllocateBlockContext(
|
||||
HAllocateBlockContext* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* function = UseRegisterAtStart(instr->function());
|
||||
LAllocateBlockContext* result =
|
||||
new(zone()) LAllocateBlockContext(context, function);
|
||||
return MarkAsCall(DefineFixed(result, cp), instr);
|
||||
}
|
||||
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
||||
|
@ -23,7 +23,6 @@ class LCodeGen;
|
||||
V(AddI) \
|
||||
V(AddS) \
|
||||
V(Allocate) \
|
||||
V(AllocateBlockContext) \
|
||||
V(ApplyArguments) \
|
||||
V(ArgumentsElements) \
|
||||
V(ArgumentsLength) \
|
||||
@ -2573,23 +2572,6 @@ class LStoreFrameContext: public LTemplateInstruction<0, 1, 0> {
|
||||
};
|
||||
|
||||
|
||||
class LAllocateBlockContext: public LTemplateInstruction<1, 2, 0> {
|
||||
public:
|
||||
LAllocateBlockContext(LOperand* context, LOperand* function) {
|
||||
inputs_[0] = context;
|
||||
inputs_[1] = function;
|
||||
}
|
||||
|
||||
LOperand* context() { return inputs_[0]; }
|
||||
LOperand* function() { return inputs_[1]; }
|
||||
|
||||
Handle<ScopeInfo> scope_info() { return hydrogen()->scope_info(); }
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(AllocateBlockContext, "allocate-block-context")
|
||||
DECLARE_HYDROGEN_ACCESSOR(AllocateBlockContext)
|
||||
};
|
||||
|
||||
|
||||
class LChunkBuilder;
|
||||
class LPlatformChunk final : public LChunk {
|
||||
public:
|
||||
|
@ -5755,15 +5755,6 @@ void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) {
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) {
|
||||
Handle<ScopeInfo> scope_info = instr->scope_info();
|
||||
__ Push(scope_info);
|
||||
__ push(ToRegister(instr->function()));
|
||||
CallRuntime(Runtime::kPushBlockContext, instr);
|
||||
RecordSafepoint(Safepoint::kNoLazyDeopt);
|
||||
}
|
||||
|
||||
|
||||
#undef __
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
@ -2553,14 +2553,5 @@ LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) {
|
||||
return new (zone()) LStoreFrameContext(context);
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoAllocateBlockContext(
|
||||
HAllocateBlockContext* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), cp);
|
||||
LOperand* function = UseRegisterAtStart(instr->function());
|
||||
LAllocateBlockContext* result =
|
||||
new (zone()) LAllocateBlockContext(context, function);
|
||||
return MarkAsCall(DefineFixed(result, cp), instr);
|
||||
}
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
@ -21,7 +21,6 @@ class LCodeGen;
|
||||
V(AccessArgumentsAt) \
|
||||
V(AddI) \
|
||||
V(Allocate) \
|
||||
V(AllocateBlockContext) \
|
||||
V(ApplyArguments) \
|
||||
V(ArgumentsElements) \
|
||||
V(ArgumentsLength) \
|
||||
@ -2456,23 +2455,6 @@ class LStoreFrameContext : public LTemplateInstruction<0, 1, 0> {
|
||||
};
|
||||
|
||||
|
||||
class LAllocateBlockContext : public LTemplateInstruction<1, 2, 0> {
|
||||
public:
|
||||
LAllocateBlockContext(LOperand* context, LOperand* function) {
|
||||
inputs_[0] = context;
|
||||
inputs_[1] = function;
|
||||
}
|
||||
|
||||
LOperand* context() { return inputs_[0]; }
|
||||
LOperand* function() { return inputs_[1]; }
|
||||
|
||||
Handle<ScopeInfo> scope_info() { return hydrogen()->scope_info(); }
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(AllocateBlockContext, "allocate-block-context")
|
||||
DECLARE_HYDROGEN_ACCESSOR(AllocateBlockContext)
|
||||
};
|
||||
|
||||
|
||||
class LChunkBuilder;
|
||||
class LPlatformChunk final : public LChunk {
|
||||
public:
|
||||
|
@ -5586,15 +5586,6 @@ void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) {
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) {
|
||||
Handle<ScopeInfo> scope_info = instr->scope_info();
|
||||
__ Push(scope_info);
|
||||
__ Push(ToRegister(instr->function()));
|
||||
CallRuntime(Runtime::kPushBlockContext, instr);
|
||||
RecordSafepoint(Safepoint::kNoLazyDeopt);
|
||||
}
|
||||
|
||||
|
||||
#undef __
|
||||
|
||||
} // namespace internal
|
||||
|
@ -2656,16 +2656,6 @@ LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) {
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoAllocateBlockContext(
|
||||
HAllocateBlockContext* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), rsi);
|
||||
LOperand* function = UseRegisterAtStart(instr->function());
|
||||
LAllocateBlockContext* result =
|
||||
new(zone()) LAllocateBlockContext(context, function);
|
||||
return MarkAsCall(DefineFixed(result, rsi), instr);
|
||||
}
|
||||
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
||||
|
@ -21,7 +21,6 @@ class LCodeGen;
|
||||
V(AccessArgumentsAt) \
|
||||
V(AddI) \
|
||||
V(Allocate) \
|
||||
V(AllocateBlockContext) \
|
||||
V(ApplyArguments) \
|
||||
V(ArgumentsElements) \
|
||||
V(ArgumentsLength) \
|
||||
@ -2541,23 +2540,6 @@ class LStoreFrameContext: public LTemplateInstruction<0, 1, 0> {
|
||||
};
|
||||
|
||||
|
||||
class LAllocateBlockContext: public LTemplateInstruction<1, 2, 0> {
|
||||
public:
|
||||
LAllocateBlockContext(LOperand* context, LOperand* function) {
|
||||
inputs_[0] = context;
|
||||
inputs_[1] = function;
|
||||
}
|
||||
|
||||
LOperand* context() { return inputs_[0]; }
|
||||
LOperand* function() { return inputs_[1]; }
|
||||
|
||||
Handle<ScopeInfo> scope_info() { return hydrogen()->scope_info(); }
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(AllocateBlockContext, "allocate-block-context")
|
||||
DECLARE_HYDROGEN_ACCESSOR(AllocateBlockContext)
|
||||
};
|
||||
|
||||
|
||||
class LChunkBuilder;
|
||||
class LPlatformChunk final : public LChunk {
|
||||
public:
|
||||
|
@ -5960,15 +5960,6 @@ void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) {
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoAllocateBlockContext(LAllocateBlockContext* instr) {
|
||||
Handle<ScopeInfo> scope_info = instr->scope_info();
|
||||
__ Push(scope_info);
|
||||
__ push(ToRegister(instr->function()));
|
||||
CallRuntime(Runtime::kPushBlockContext, instr);
|
||||
RecordSafepoint(Safepoint::kNoLazyDeopt);
|
||||
}
|
||||
|
||||
|
||||
#undef __
|
||||
|
||||
} // namespace internal
|
||||
|
@ -2671,16 +2671,6 @@ LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) {
|
||||
}
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoAllocateBlockContext(
|
||||
HAllocateBlockContext* instr) {
|
||||
LOperand* context = UseFixed(instr->context(), esi);
|
||||
LOperand* function = UseRegisterAtStart(instr->function());
|
||||
LAllocateBlockContext* result =
|
||||
new(zone()) LAllocateBlockContext(context, function);
|
||||
return MarkAsCall(DefineFixed(result, esi), instr);
|
||||
}
|
||||
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
||||
|
@ -24,7 +24,6 @@ class LCodeGen;
|
||||
#define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \
|
||||
V(AccessArgumentsAt) \
|
||||
V(AddI) \
|
||||
V(AllocateBlockContext) \
|
||||
V(Allocate) \
|
||||
V(ApplyArguments) \
|
||||
V(ArgumentsElements) \
|
||||
@ -2573,23 +2572,6 @@ class LStoreFrameContext: public LTemplateInstruction<0, 1, 0> {
|
||||
};
|
||||
|
||||
|
||||
class LAllocateBlockContext: public LTemplateInstruction<1, 2, 0> {
|
||||
public:
|
||||
LAllocateBlockContext(LOperand* context, LOperand* function) {
|
||||
inputs_[0] = context;
|
||||
inputs_[1] = function;
|
||||
}
|
||||
|
||||
LOperand* context() { return inputs_[0]; }
|
||||
LOperand* function() { return inputs_[1]; }
|
||||
|
||||
Handle<ScopeInfo> scope_info() { return hydrogen()->scope_info(); }
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(AllocateBlockContext, "allocate-block-context")
|
||||
DECLARE_HYDROGEN_ACCESSOR(AllocateBlockContext)
|
||||
};
|
||||
|
||||
|
||||
class LChunkBuilder;
|
||||
class LPlatformChunk final : public LChunk {
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user