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 2536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2547 instr->ReplayEnvironment(current_block_->last_environment()); | 2547 instr->ReplayEnvironment(current_block_->last_environment()); |
2548 | 2548 |
2549 // There are no real uses of a captured object. | 2549 // There are no real uses of a captured object. |
2550 return NULL; | 2550 return NULL; |
2551 } | 2551 } |
2552 | 2552 |
2553 | 2553 |
2554 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { | 2554 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { |
2555 info()->MarkAsRequiresFrame(); | 2555 info()->MarkAsRequiresFrame(); |
2556 LOperand* args = UseRegister(instr->arguments()); | 2556 LOperand* args = UseRegister(instr->arguments()); |
2557 LOperand* length; | 2557 LOperand* length = UseRegisterOrConstantAtStart(instr->length()); |
2558 LOperand* index; | 2558 LOperand* index = UseRegisterOrConstantAtStart(instr->index()); |
2559 if (instr->length()->IsConstant() && instr->index()->IsConstant()) { | |
2560 length = UseRegisterOrConstant(instr->length()); | |
2561 index = UseOrConstant(instr->index()); | |
2562 } else { | |
2563 length = UseTempRegister(instr->length()); | |
2564 index = UseRegisterAtStart(instr->index()); | |
2565 } | |
2566 return DefineAsRegister(new(zone()) LAccessArgumentsAt(args, length, index)); | 2559 return DefineAsRegister(new(zone()) LAccessArgumentsAt(args, length, index)); |
2567 } | 2560 } |
2568 | 2561 |
2569 | 2562 |
2570 LInstruction* LChunkBuilder::DoToFastProperties(HToFastProperties* instr) { | 2563 LInstruction* LChunkBuilder::DoToFastProperties(HToFastProperties* instr) { |
2571 LOperand* object = UseFixed(instr->value(), r0); | 2564 LOperand* object = UseFixed(instr->value(), r0); |
2572 LToFastProperties* result = new(zone()) LToFastProperties(object); | 2565 LToFastProperties* result = new(zone()) LToFastProperties(object); |
2573 return MarkAsCall(DefineFixed(result, r0), instr); | 2566 return MarkAsCall(DefineFixed(result, r0), instr); |
2574 } | 2567 } |
2575 | 2568 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2690 | 2683 |
2691 | 2684 |
2692 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2685 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2693 LOperand* object = UseRegister(instr->object()); | 2686 LOperand* object = UseRegister(instr->object()); |
2694 LOperand* index = UseRegister(instr->index()); | 2687 LOperand* index = UseRegister(instr->index()); |
2695 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2688 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2696 } | 2689 } |
2697 | 2690 |
2698 | 2691 |
2699 } } // namespace v8::internal | 2692 } } // namespace v8::internal |
OLD | NEW |