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 2501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2512 return AssignPointerMap(DefineAsRegister(result)); | 2512 return AssignPointerMap(DefineAsRegister(result)); |
2513 } | 2513 } |
2514 | 2514 |
2515 | 2515 |
2516 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { | 2516 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { |
2517 LOperand* string = UseRegisterAtStart(instr->value()); | 2517 LOperand* string = UseRegisterAtStart(instr->value()); |
2518 return DefineAsRegister(new(zone()) LStringLength(string)); | 2518 return DefineAsRegister(new(zone()) LStringLength(string)); |
2519 } | 2519 } |
2520 | 2520 |
2521 | 2521 |
2522 LInstruction* LChunkBuilder::DoAllocateObject(HAllocateObject* instr) { | |
2523 info()->MarkAsDeferredCalling(); | |
2524 LOperand* context = UseAny(instr->context()); | |
2525 LOperand* temp = TempRegister(); | |
2526 LAllocateObject* result = new(zone()) LAllocateObject(context, temp); | |
2527 return AssignPointerMap(DefineAsRegister(result)); | |
2528 } | |
2529 | |
2530 | |
2531 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { | 2522 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { |
2532 info()->MarkAsDeferredCalling(); | 2523 info()->MarkAsDeferredCalling(); |
2533 LOperand* context = UseAny(instr->context()); | 2524 LOperand* context = UseAny(instr->context()); |
2534 LOperand* size = instr->size()->IsConstant() | 2525 LOperand* size = instr->size()->IsConstant() |
2535 ? UseConstant(instr->size()) | 2526 ? UseConstant(instr->size()) |
2536 : UseTempRegister(instr->size()); | 2527 : UseTempRegister(instr->size()); |
2537 LOperand* temp = TempRegister(); | 2528 LOperand* temp = TempRegister(); |
2538 LAllocate* result = new(zone()) LAllocate(context, size, temp); | 2529 LAllocate* result = new(zone()) LAllocate(context, size, temp); |
2539 return AssignPointerMap(DefineAsRegister(result)); | 2530 return AssignPointerMap(DefineAsRegister(result)); |
2540 } | 2531 } |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2776 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2767 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2777 LOperand* object = UseRegister(instr->object()); | 2768 LOperand* object = UseRegister(instr->object()); |
2778 LOperand* index = UseTempRegister(instr->index()); | 2769 LOperand* index = UseTempRegister(instr->index()); |
2779 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2770 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2780 } | 2771 } |
2781 | 2772 |
2782 | 2773 |
2783 } } // namespace v8::internal | 2774 } } // namespace v8::internal |
2784 | 2775 |
2785 #endif // V8_TARGET_ARCH_IA32 | 2776 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |