Chromium Code Reviews| Index: src/arm/lithium-arm.cc |
| diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc |
| index 4c081e23d13dc8615faf3698e0946c5bfaf62a80..d744529f2b0116e75bf1398726902d21f631d13e 100644 |
| --- a/src/arm/lithium-arm.cc |
| +++ b/src/arm/lithium-arm.cc |
| @@ -1077,7 +1077,8 @@ LInstruction* LChunkBuilder::DoArgumentsLength(HArgumentsLength* instr) { |
| LInstruction* LChunkBuilder::DoArgumentsElements(HArgumentsElements* elems) { |
| - return DefineAsRegister(new(zone()) LArgumentsElements); |
| + return DefineAsRegister(new(zone()) LArgumentsElements( |
| + current_block_->last_environment()->outer() != NULL)); |
|
Kevin Millikin (Chromium)
2012/04/11 11:49:18
I'd be more comfortable if we set this flag on the
Vyacheslav Egorov (Chromium)
2012/04/11 12:47:28
Done.
|
| } |
| @@ -2271,8 +2272,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()); |
| @@ -2281,10 +2282,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; |
| } |