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

Unified Diff: src/compiler/js-typed-lowering.cc

Issue 1379593002: [turbofan] Pass scope infos as static operator parameters. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-turbofan-verifier
Patch Set: Fix Windows build. Created 5 years, 3 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/compiler/js-operator.cc ('k') | src/compiler/operator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-typed-lowering.cc
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc
index 5a0a000176da0200ea77278a691718a1ae9bde96..c8b259685195d11311d6ac85aa0c8589bebaa1d9 100644
--- a/src/compiler/js-typed-lowering.cc
+++ b/src/compiler/js-typed-lowering.cc
@@ -1259,16 +1259,15 @@ Reduction JSTypedLowering::ReduceJSCreateWithContext(Node* node) {
Reduction JSTypedLowering::ReduceJSCreateBlockContext(Node* node) {
DCHECK_EQ(IrOpcode::kJSCreateBlockContext, node->opcode());
- Node* const input = NodeProperties::GetValueInput(node, 0);
- HeapObjectMatcher minput(input);
- DCHECK(minput.HasValue()); // TODO(mstarzinger): Make ScopeInfo static.
- int context_length = Handle<ScopeInfo>::cast(minput.Value())->ContextLength();
+ Handle<ScopeInfo> scope_info = OpParameter<Handle<ScopeInfo>>(node);
+ int context_length = scope_info->ContextLength();
if (FLAG_turbo_allocate && context_length < kBlockContextAllocationLimit) {
// JSCreateBlockContext(s:scope[length < limit], f)
Node* const effect = NodeProperties::GetEffectInput(node);
Node* const control = NodeProperties::GetControlInput(node);
Node* const closure = NodeProperties::GetValueInput(node, 1);
Node* const context = NodeProperties::GetContextInput(node);
+ Node* const extension = jsgraph()->Constant(scope_info);
Node* const load = graph()->NewNode(
simplified()->LoadField(
AccessBuilder::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)),
@@ -1278,7 +1277,7 @@ Reduction JSTypedLowering::ReduceJSCreateBlockContext(Node* node) {
a.AllocateArray(context_length, factory()->block_context_map());
a.Store(AccessBuilder::ForContextSlot(Context::CLOSURE_INDEX), closure);
a.Store(AccessBuilder::ForContextSlot(Context::PREVIOUS_INDEX), context);
- a.Store(AccessBuilder::ForContextSlot(Context::EXTENSION_INDEX), input);
+ a.Store(AccessBuilder::ForContextSlot(Context::EXTENSION_INDEX), extension);
a.Store(AccessBuilder::ForContextSlot(Context::GLOBAL_OBJECT_INDEX), load);
for (int i = Context::MIN_CONTEXT_SLOTS; i < context_length; ++i) {
a.Store(AccessBuilder::ForContextSlot(i), jsgraph()->TheHoleConstant());
« no previous file with comments | « src/compiler/js-operator.cc ('k') | src/compiler/operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698