Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Unified Diff: src/crankshaft/hydrogen.cc

Issue 1702313002: [crankshaft] Remove the useless HAllocateBlockContext instruction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen.cc
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
index 60403f175296b3eb0c25c945cc48740854e2bcd8..943703d22ea03cda295d8a5a87e04cafdce21c96 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -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);
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698