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 2441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2452 instr->ReplayEnvironment(current_block_->last_environment()); | 2452 instr->ReplayEnvironment(current_block_->last_environment()); |
2453 | 2453 |
2454 // There are no real uses of a captured object. | 2454 // There are no real uses of a captured object. |
2455 return NULL; | 2455 return NULL; |
2456 } | 2456 } |
2457 | 2457 |
2458 | 2458 |
2459 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { | 2459 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { |
2460 info()->MarkAsRequiresFrame(); | 2460 info()->MarkAsRequiresFrame(); |
2461 LOperand* args = UseRegister(instr->arguments()); | 2461 LOperand* args = UseRegister(instr->arguments()); |
2462 LOperand* length; | 2462 LOperand* length = UseRegisterOrConstantAtStart(instr->length()); |
2463 LOperand* index; | 2463 LOperand* index = UseRegisterOrConstantAtStart(instr->index()); |
2464 if (instr->length()->IsConstant() && instr->index()->IsConstant()) { | |
2465 length = UseRegisterOrConstant(instr->length()); | |
2466 index = UseOrConstant(instr->index()); | |
2467 } else { | |
2468 length = UseTempRegister(instr->length()); | |
2469 index = UseRegisterAtStart(instr->index()); | |
2470 } | |
2471 return DefineAsRegister(new(zone()) LAccessArgumentsAt(args, length, index)); | 2464 return DefineAsRegister(new(zone()) LAccessArgumentsAt(args, length, index)); |
2472 } | 2465 } |
2473 | 2466 |
2474 | 2467 |
2475 LInstruction* LChunkBuilder::DoToFastProperties(HToFastProperties* instr) { | 2468 LInstruction* LChunkBuilder::DoToFastProperties(HToFastProperties* instr) { |
2476 LOperand* object = UseFixed(instr->value(), a0); | 2469 LOperand* object = UseFixed(instr->value(), a0); |
2477 LToFastProperties* result = new(zone()) LToFastProperties(object); | 2470 LToFastProperties* result = new(zone()) LToFastProperties(object); |
2478 return MarkAsCall(DefineFixed(result, v0), instr); | 2471 return MarkAsCall(DefineFixed(result, v0), instr); |
2479 } | 2472 } |
2480 | 2473 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2595 | 2588 |
2596 | 2589 |
2597 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2590 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2598 LOperand* object = UseRegister(instr->object()); | 2591 LOperand* object = UseRegister(instr->object()); |
2599 LOperand* index = UseRegister(instr->index()); | 2592 LOperand* index = UseRegister(instr->index()); |
2600 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2593 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2601 } | 2594 } |
2602 | 2595 |
2603 | 2596 |
2604 } } // namespace v8::internal | 2597 } } // namespace v8::internal |
OLD | NEW |