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 2259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2270 | 2270 |
2271 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { | 2271 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { |
2272 HEnvironment* outer = current_block_->last_environment(); | 2272 HEnvironment* outer = current_block_->last_environment(); |
2273 HConstant* undefined = graph()->GetConstantUndefined(); | 2273 HConstant* undefined = graph()->GetConstantUndefined(); |
2274 HEnvironment* inner = outer->CopyForInlining(instr->closure(), | 2274 HEnvironment* inner = outer->CopyForInlining(instr->closure(), |
2275 instr->arguments_count(), | 2275 instr->arguments_count(), |
2276 instr->function(), | 2276 instr->function(), |
2277 undefined, | 2277 undefined, |
2278 instr->call_kind(), | 2278 instr->call_kind(), |
2279 instr->is_construct()); | 2279 instr->is_construct()); |
| 2280 if (instr->arguments() != NULL) { |
| 2281 inner->Bind(instr->arguments(), graph()->GetArgumentsObject()); |
| 2282 } |
2280 current_block_->UpdateEnvironment(inner); | 2283 current_block_->UpdateEnvironment(inner); |
2281 chunk_->AddInlinedClosure(instr->closure()); | 2284 chunk_->AddInlinedClosure(instr->closure()); |
2282 return NULL; | 2285 return NULL; |
2283 } | 2286 } |
2284 | 2287 |
2285 | 2288 |
2286 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2289 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
2287 HEnvironment* outer = current_block_->last_environment()-> | 2290 HEnvironment* outer = current_block_->last_environment()-> |
2288 DiscardInlined(false); | 2291 DiscardInlined(false); |
2289 current_block_->UpdateEnvironment(outer); | 2292 current_block_->UpdateEnvironment(outer); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2321 | 2324 |
2322 | 2325 |
2323 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2326 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2324 LOperand* object = UseRegister(instr->object()); | 2327 LOperand* object = UseRegister(instr->object()); |
2325 LOperand* index = UseRegister(instr->index()); | 2328 LOperand* index = UseRegister(instr->index()); |
2326 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2329 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2327 } | 2330 } |
2328 | 2331 |
2329 | 2332 |
2330 } } // namespace v8::internal | 2333 } } // namespace v8::internal |
OLD | NEW |