| Index: src/full-codegen/x64/full-codegen-x64.cc | 
| diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc | 
| index 67c8ecb908ccd3d4b50c67e9b4581889f4489b00..1f1518f04be689773277ea3d983ba2263809afe6 100644 | 
| --- a/src/full-codegen/x64/full-codegen-x64.cc | 
| +++ b/src/full-codegen/x64/full-codegen-x64.cc | 
| @@ -91,6 +91,7 @@ class JumpPatchSite BASE_EMBEDDED { | 
| // frames-x64.h for its layout. | 
| void FullCodeGenerator::Generate() { | 
| CompilationInfo* info = info_; | 
| +  DCHECK_EQ(scope(), info->scope()); | 
| profiling_counter_ = isolate()->factory()->NewCell( | 
| Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget), isolate())); | 
| SetFunctionPosition(literal()); | 
| @@ -193,7 +194,8 @@ void FullCodeGenerator::Generate() { | 
| int num_parameters = info->scope()->num_parameters(); | 
| int first_parameter = info->scope()->has_this_declaration() ? -1 : 0; | 
| for (int i = first_parameter; i < num_parameters; i++) { | 
| -      Variable* var = (i == -1) ? scope()->receiver() : scope()->parameter(i); | 
| +      Variable* var = | 
| +          (i == -1) ? info->scope()->receiver() : info->scope()->parameter(i); | 
| if (var->IsContextSlot()) { | 
| int parameter_offset = StandardFrameConstants::kCallerSPOffset + | 
| (num_parameters - 1 - i) * kPointerSize; | 
| @@ -224,7 +226,7 @@ void FullCodeGenerator::Generate() { | 
|  | 
| // Possibly set up a local binding to the this function which is used in | 
| // derived constructors with super calls. | 
| -  Variable* this_function_var = scope()->this_function_var(); | 
| +  Variable* this_function_var = info->scope()->this_function_var(); | 
| if (this_function_var != nullptr) { | 
| Comment cmnt(masm_, "[ This function"); | 
| if (!function_in_register) { | 
| @@ -235,7 +237,7 @@ void FullCodeGenerator::Generate() { | 
| } | 
|  | 
| // Possibly set up a local binding to the new target value. | 
| -  Variable* new_target_var = scope()->new_target_var(); | 
| +  Variable* new_target_var = info->scope()->new_target_var(); | 
| if (new_target_var != nullptr) { | 
| Comment cmnt(masm_, "[ new.target"); | 
| SetVar(new_target_var, rdx, rbx, rcx); | 
| @@ -243,7 +245,7 @@ void FullCodeGenerator::Generate() { | 
|  | 
| // Possibly allocate RestParameters | 
| int rest_index; | 
| -  Variable* rest_param = scope()->rest_parameter(&rest_index); | 
| +  Variable* rest_param = info->scope()->rest_parameter(&rest_index); | 
| if (rest_param) { | 
| Comment cmnt(masm_, "[ Allocate rest parameter array"); | 
| if (!function_in_register) { | 
| @@ -256,7 +258,8 @@ void FullCodeGenerator::Generate() { | 
| } | 
|  | 
| // Possibly allocate an arguments object. | 
| -  Variable* arguments = scope()->arguments(); | 
| +  DCHECK_EQ(scope(), info->scope()); | 
| +  Variable* arguments = info->scope()->arguments(); | 
| if (arguments != NULL) { | 
| // Arguments object must be allocated after the context object, in | 
| // case the "arguments" or ".arguments" variables are in the context. | 
| @@ -288,7 +291,7 @@ void FullCodeGenerator::Generate() { | 
| BailoutState::NO_REGISTERS); | 
| { | 
| Comment cmnt(masm_, "[ Declarations"); | 
| -    VisitDeclarations(scope()->declarations()); | 
| +    VisitDeclarations(info->scope()->declarations()); | 
| } | 
|  | 
| // Assert that the declarations do not use ICs. Otherwise the debugger | 
| @@ -3507,7 +3510,7 @@ void FullCodeGenerator::LoadContextField(Register dst, int context_index) { | 
|  | 
|  | 
| void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { | 
| -  Scope* closure_scope = scope()->ClosureScope(); | 
| +  DeclarationScope* closure_scope = scope()->GetClosureScope(); | 
| if (closure_scope->is_script_scope() || | 
| closure_scope->is_module_scope()) { | 
| // Contexts nested in the native context have a canonical empty function | 
|  |