| 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..a1c267efcefa3ef5a8479f7c93d8d8f36d545b5b 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* extension = aa.Finish();
|
| +
|
| + AllocationBuilder a(jsgraph(), extension, 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), extension);
|
| a.Store(AccessBuilder::ForContextSlot(Context::NATIVE_CONTEXT_INDEX),
|
| native_context);
|
| a.Store(AccessBuilder::ForContextSlot(Context::THROWN_OBJECT_INDEX),
|
|
|