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 2530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2541 return AssignPointerMap(DefineAsRegister(result)); | 2541 return AssignPointerMap(DefineAsRegister(result)); |
2542 } | 2542 } |
2543 | 2543 |
2544 | 2544 |
2545 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { | 2545 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { |
2546 LOperand* string = UseRegisterAtStart(instr->value()); | 2546 LOperand* string = UseRegisterAtStart(instr->value()); |
2547 return DefineAsRegister(new(zone()) LStringLength(string)); | 2547 return DefineAsRegister(new(zone()) LStringLength(string)); |
2548 } | 2548 } |
2549 | 2549 |
2550 | 2550 |
| 2551 LInstruction* LChunkBuilder::DoAllocateObject(HAllocateObject* instr) { |
| 2552 info()->MarkAsDeferredCalling(); |
| 2553 LOperand* context = UseAny(instr->context()); |
| 2554 LOperand* temp = TempRegister(); |
| 2555 LAllocateObject* result = new(zone()) LAllocateObject(context, temp); |
| 2556 return AssignPointerMap(DefineAsRegister(result)); |
| 2557 } |
| 2558 |
| 2559 |
2551 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { | 2560 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { |
2552 info()->MarkAsDeferredCalling(); | 2561 info()->MarkAsDeferredCalling(); |
2553 LOperand* context = UseAny(instr->context()); | 2562 LOperand* context = UseAny(instr->context()); |
2554 LOperand* size = instr->size()->IsConstant() | 2563 LOperand* size = instr->size()->IsConstant() |
2555 ? UseConstant(instr->size()) | 2564 ? UseConstant(instr->size()) |
2556 : UseTempRegister(instr->size()); | 2565 : UseTempRegister(instr->size()); |
2557 LOperand* temp = TempRegister(); | 2566 LOperand* temp = TempRegister(); |
2558 LAllocate* result = new(zone()) LAllocate(context, size, temp); | 2567 LAllocate* result = new(zone()) LAllocate(context, size, temp); |
2559 return AssignPointerMap(DefineAsRegister(result)); | 2568 return AssignPointerMap(DefineAsRegister(result)); |
2560 } | 2569 } |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2797 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2806 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2798 LOperand* object = UseRegister(instr->object()); | 2807 LOperand* object = UseRegister(instr->object()); |
2799 LOperand* index = UseTempRegister(instr->index()); | 2808 LOperand* index = UseTempRegister(instr->index()); |
2800 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2809 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2801 } | 2810 } |
2802 | 2811 |
2803 | 2812 |
2804 } } // namespace v8::internal | 2813 } } // namespace v8::internal |
2805 | 2814 |
2806 #endif // V8_TARGET_ARCH_IA32 | 2815 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |