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 2310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2321 return AssignPointerMap(DefineAsRegister(result)); | 2321 return AssignPointerMap(DefineAsRegister(result)); |
2322 } | 2322 } |
2323 | 2323 |
2324 | 2324 |
2325 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { | 2325 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { |
2326 LOperand* string = UseRegisterAtStart(instr->value()); | 2326 LOperand* string = UseRegisterAtStart(instr->value()); |
2327 return DefineAsRegister(new(zone()) LStringLength(string)); | 2327 return DefineAsRegister(new(zone()) LStringLength(string)); |
2328 } | 2328 } |
2329 | 2329 |
2330 | 2330 |
2331 LInstruction* LChunkBuilder::DoAllocateObject(HAllocateObject* instr) { | |
2332 info()->MarkAsDeferredCalling(); | |
2333 LAllocateObject* result = new(zone()) LAllocateObject(TempRegister()); | |
2334 return AssignPointerMap(DefineAsRegister(result)); | |
2335 } | |
2336 | |
2337 | |
2338 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { | 2331 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { |
2339 info()->MarkAsDeferredCalling(); | 2332 info()->MarkAsDeferredCalling(); |
2340 LOperand* size = instr->size()->IsConstant() | 2333 LOperand* size = instr->size()->IsConstant() |
2341 ? UseConstant(instr->size()) | 2334 ? UseConstant(instr->size()) |
2342 : UseTempRegister(instr->size()); | 2335 : UseTempRegister(instr->size()); |
2343 LOperand* temp = TempRegister(); | 2336 LOperand* temp = TempRegister(); |
2344 LAllocate* result = new(zone()) LAllocate(size, temp); | 2337 LAllocate* result = new(zone()) LAllocate(size, temp); |
2345 return AssignPointerMap(DefineAsRegister(result)); | 2338 return AssignPointerMap(DefineAsRegister(result)); |
2346 } | 2339 } |
2347 | 2340 |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2568 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2561 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2569 LOperand* object = UseRegister(instr->object()); | 2562 LOperand* object = UseRegister(instr->object()); |
2570 LOperand* index = UseTempRegister(instr->index()); | 2563 LOperand* index = UseTempRegister(instr->index()); |
2571 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2564 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2572 } | 2565 } |
2573 | 2566 |
2574 | 2567 |
2575 } } // namespace v8::internal | 2568 } } // namespace v8::internal |
2576 | 2569 |
2577 #endif // V8_TARGET_ARCH_X64 | 2570 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |