OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2456 | 2456 |
2457 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { | 2457 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { |
2458 HEnvironment* outer = current_block_->last_environment(); | 2458 HEnvironment* outer = current_block_->last_environment(); |
2459 HConstant* undefined = graph()->GetConstantUndefined(); | 2459 HConstant* undefined = graph()->GetConstantUndefined(); |
2460 HEnvironment* inner = outer->CopyForInlining(instr->closure(), | 2460 HEnvironment* inner = outer->CopyForInlining(instr->closure(), |
2461 instr->arguments_count(), | 2461 instr->arguments_count(), |
2462 instr->function(), | 2462 instr->function(), |
2463 undefined, | 2463 undefined, |
2464 instr->inlining_kind(), | 2464 instr->inlining_kind(), |
2465 instr->undefined_receiver()); | 2465 instr->undefined_receiver()); |
2466 if (instr->arguments_var() != NULL) { | 2466 // Only replay binding of arguments object if it wasn't removed from graph. |
2467 inner->Bind(instr->arguments_var(), graph()->GetArgumentsObject()); | 2467 if (instr->arguments_var() != NULL && instr->arguments_object()->IsLinked()) { |
| 2468 inner->Bind(instr->arguments_var(), instr->arguments_object()); |
2468 } | 2469 } |
2469 inner->set_entry(instr); | 2470 inner->set_entry(instr); |
2470 current_block_->UpdateEnvironment(inner); | 2471 current_block_->UpdateEnvironment(inner); |
2471 chunk_->AddInlinedClosure(instr->closure()); | 2472 chunk_->AddInlinedClosure(instr->closure()); |
2472 return NULL; | 2473 return NULL; |
2473 } | 2474 } |
2474 | 2475 |
2475 | 2476 |
2476 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2477 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
2477 LInstruction* pop = NULL; | 2478 LInstruction* pop = NULL; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2521 | 2522 |
2522 | 2523 |
2523 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2524 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2524 LOperand* object = UseRegister(instr->object()); | 2525 LOperand* object = UseRegister(instr->object()); |
2525 LOperand* index = UseRegister(instr->index()); | 2526 LOperand* index = UseRegister(instr->index()); |
2526 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2527 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2527 } | 2528 } |
2528 | 2529 |
2529 | 2530 |
2530 } } // namespace v8::internal | 2531 } } // namespace v8::internal |
OLD | NEW |