Chromium Code Reviews| Index: src/compiler/js-create-lowering.cc |
| diff --git a/src/compiler/js-create-lowering.cc b/src/compiler/js-create-lowering.cc |
| index 21997f7d5822fa84f082e9a02beb6e1776230a07..a21addb5db1ee43825f29b3948fa01ce04e6dd10 100644 |
| --- a/src/compiler/js-create-lowering.cc |
| +++ b/src/compiler/js-create-lowering.cc |
| @@ -838,7 +838,8 @@ Reduction JSCreateLowering::ReduceJSCreateWithContext(Node* node) { |
| Reduction JSCreateLowering::ReduceJSCreateCatchContext(Node* node) { |
| DCHECK_EQ(IrOpcode::kJSCreateCatchContext, node->opcode()); |
| - Handle<String> name = OpParameter<Handle<String>>(node); |
| + const CreateCatchContextParameters& parameters = |
| + CreateCatchContextParametersOf(node->op()); |
| Node* exception = NodeProperties::GetValueInput(node, 0); |
| Node* closure = NodeProperties::GetValueInput(node, 1); |
| Node* effect = NodeProperties::GetEffectInput(node); |
| @@ -847,13 +848,23 @@ Reduction JSCreateLowering::ReduceJSCreateCatchContext(Node* node) { |
| Node* native_context = effect = graph()->NewNode( |
| javascript()->LoadContext(0, Context::NATIVE_CONTEXT_INDEX, true), |
| context, context, effect); |
| - AllocationBuilder a(jsgraph(), effect, control); |
| + |
| + AllocationBuilder aa(jsgraph(), effect, control); |
| + aa.Allocate(ContextExtension::kSize); |
| + aa.Store(AccessBuilder::ForMap(), factory()->context_extension_map()); |
| + aa.Store(AccessBuilder::ForContextExtensionScopeInfo(), |
| + parameters.scope_info()); |
| + aa.Store(AccessBuilder::ForContextExtensionExtension(), |
| + parameters.catch_name()); |
| + Node* arguments = aa.Finish(); |
|
Michael Starzinger
2016/09/05 11:35:29
nit: s/arguments/extension/
jochen (gone - plz use gerrit)
2016/09/05 11:42:44
done
|
| + |
| + AllocationBuilder a(jsgraph(), arguments, control); |
| STATIC_ASSERT(Context::MIN_CONTEXT_SLOTS == 4); // Ensure fully covered. |
| a.AllocateArray(Context::MIN_CONTEXT_SLOTS + 1, |
| factory()->catch_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), name); |
| + a.Store(AccessBuilder::ForContextSlot(Context::EXTENSION_INDEX), arguments); |
| a.Store(AccessBuilder::ForContextSlot(Context::NATIVE_CONTEXT_INDEX), |
| native_context); |
| a.Store(AccessBuilder::ForContextSlot(Context::THROWN_OBJECT_INDEX), |