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 2402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2413 return AssignPointerMap(DefineAsRegister(result)); | 2413 return AssignPointerMap(DefineAsRegister(result)); |
2414 } | 2414 } |
2415 | 2415 |
2416 | 2416 |
2417 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { | 2417 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { |
2418 LOperand* string = UseRegisterAtStart(instr->value()); | 2418 LOperand* string = UseRegisterAtStart(instr->value()); |
2419 return DefineAsRegister(new(zone()) LStringLength(string)); | 2419 return DefineAsRegister(new(zone()) LStringLength(string)); |
2420 } | 2420 } |
2421 | 2421 |
2422 | 2422 |
| 2423 LInstruction* LChunkBuilder::DoAllocateObject(HAllocateObject* instr) { |
| 2424 info()->MarkAsDeferredCalling(); |
| 2425 LAllocateObject* result = |
| 2426 new(zone()) LAllocateObject(TempRegister(), TempRegister()); |
| 2427 return AssignPointerMap(DefineAsRegister(result)); |
| 2428 } |
| 2429 |
| 2430 |
2423 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { | 2431 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { |
2424 info()->MarkAsDeferredCalling(); | 2432 info()->MarkAsDeferredCalling(); |
2425 LOperand* size = instr->size()->IsConstant() | 2433 LOperand* size = instr->size()->IsConstant() |
2426 ? UseConstant(instr->size()) | 2434 ? UseConstant(instr->size()) |
2427 : UseTempRegister(instr->size()); | 2435 : UseTempRegister(instr->size()); |
2428 LOperand* temp1 = TempRegister(); | 2436 LOperand* temp1 = TempRegister(); |
2429 LOperand* temp2 = TempRegister(); | 2437 LOperand* temp2 = TempRegister(); |
2430 LAllocate* result = new(zone()) LAllocate(size, temp1, temp2); | 2438 LAllocate* result = new(zone()) LAllocate(size, temp1, temp2); |
2431 return AssignPointerMap(DefineAsRegister(result)); | 2439 return AssignPointerMap(DefineAsRegister(result)); |
2432 } | 2440 } |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2651 | 2659 |
2652 | 2660 |
2653 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2661 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2654 LOperand* object = UseRegister(instr->object()); | 2662 LOperand* object = UseRegister(instr->object()); |
2655 LOperand* index = UseRegister(instr->index()); | 2663 LOperand* index = UseRegister(instr->index()); |
2656 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2664 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2657 } | 2665 } |
2658 | 2666 |
2659 | 2667 |
2660 } } // namespace v8::internal | 2668 } } // namespace v8::internal |
OLD | NEW |