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 2253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2264 | 2264 |
2265 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { | 2265 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { |
2266 HEnvironment* outer = current_block_->last_environment(); | 2266 HEnvironment* outer = current_block_->last_environment(); |
2267 HConstant* undefined = graph()->GetConstantUndefined(); | 2267 HConstant* undefined = graph()->GetConstantUndefined(); |
2268 HEnvironment* inner = outer->CopyForInlining(instr->closure(), | 2268 HEnvironment* inner = outer->CopyForInlining(instr->closure(), |
2269 instr->arguments_count(), | 2269 instr->arguments_count(), |
2270 instr->function(), | 2270 instr->function(), |
2271 undefined, | 2271 undefined, |
2272 instr->call_kind(), | 2272 instr->call_kind(), |
2273 instr->is_construct()); | 2273 instr->is_construct()); |
| 2274 if (instr->arguments() != NULL) { |
| 2275 inner->Bind(instr->arguments(), graph()->GetArgumentsObject()); |
| 2276 } |
2274 current_block_->UpdateEnvironment(inner); | 2277 current_block_->UpdateEnvironment(inner); |
2275 chunk_->AddInlinedClosure(instr->closure()); | 2278 chunk_->AddInlinedClosure(instr->closure()); |
2276 return NULL; | 2279 return NULL; |
2277 } | 2280 } |
2278 | 2281 |
2279 | 2282 |
2280 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2283 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
2281 HEnvironment* outer = current_block_->last_environment()-> | 2284 HEnvironment* outer = current_block_->last_environment()-> |
2282 DiscardInlined(false); | 2285 DiscardInlined(false); |
2283 current_block_->UpdateEnvironment(outer); | 2286 current_block_->UpdateEnvironment(outer); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2315 | 2318 |
2316 | 2319 |
2317 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2320 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2318 LOperand* object = UseRegister(instr->object()); | 2321 LOperand* object = UseRegister(instr->object()); |
2319 LOperand* index = UseRegister(instr->index()); | 2322 LOperand* index = UseRegister(instr->index()); |
2320 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2323 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2321 } | 2324 } |
2322 | 2325 |
2323 | 2326 |
2324 } } // namespace v8::internal | 2327 } } // namespace v8::internal |
OLD | NEW |