| Index: src/x64/lithium-x64.cc
|
| diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc
|
| index d147907035fbfb10b746c69a975bfd083bd3bdc0..478311c1432d7d295bdc9e8e03f8d4cb20438652 100644
|
| --- a/src/x64/lithium-x64.cc
|
| +++ b/src/x64/lithium-x64.cc
|
| @@ -1071,7 +1071,8 @@ LInstruction* LChunkBuilder::DoArgumentsLength(HArgumentsLength* length) {
|
|
|
|
|
| LInstruction* LChunkBuilder::DoArgumentsElements(HArgumentsElements* elems) {
|
| - return DefineAsRegister(new(zone()) LArgumentsElements);
|
| + return DefineAsRegister(new(zone()) LArgumentsElements(
|
| + current_block_->last_environment()->outer() != NULL));
|
| }
|
|
|
|
|
| @@ -2270,8 +2271,8 @@ LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) {
|
| undefined,
|
| instr->call_kind(),
|
| instr->is_construct());
|
| - if (instr->arguments() != NULL) {
|
| - inner->Bind(instr->arguments(), graph()->GetArgumentsObject());
|
| + if (instr->arguments_var() != NULL) {
|
| + inner->Bind(instr->arguments_var(), graph()->GetArgumentsObject());
|
| }
|
| current_block_->UpdateEnvironment(inner);
|
| chunk_->AddInlinedClosure(instr->closure());
|
| @@ -2280,10 +2281,21 @@ LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) {
|
|
|
|
|
| LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
|
| + LInstruction* pop = NULL;
|
| +
|
| + HEnvironment* env = current_block_->last_environment();
|
| +
|
| + if (instr->arguments_pushed()) {
|
| + int argument_count = env->arguments_environment()->parameter_count();
|
| + pop = new(zone()) LPop(argument_count);
|
| + argument_count_ -= argument_count;
|
| + }
|
| +
|
| HEnvironment* outer = current_block_->last_environment()->
|
| DiscardInlined(false);
|
| current_block_->UpdateEnvironment(outer);
|
| - return NULL;
|
| +
|
| + return pop;
|
| }
|
|
|
|
|
|
|