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 2320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2331 return AssignPointerMap(DefineAsRegister(result)); | 2331 return AssignPointerMap(DefineAsRegister(result)); |
2332 } | 2332 } |
2333 | 2333 |
2334 | 2334 |
2335 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { | 2335 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { |
2336 LOperand* string = UseRegisterAtStart(instr->value()); | 2336 LOperand* string = UseRegisterAtStart(instr->value()); |
2337 return DefineAsRegister(new(zone()) LStringLength(string)); | 2337 return DefineAsRegister(new(zone()) LStringLength(string)); |
2338 } | 2338 } |
2339 | 2339 |
2340 | 2340 |
2341 LInstruction* LChunkBuilder::DoAllocateObject(HAllocateObject* instr) { | |
2342 info()->MarkAsDeferredCalling(); | |
2343 LAllocateObject* result = new(zone()) LAllocateObject(TempRegister()); | |
2344 return AssignPointerMap(DefineAsRegister(result)); | |
2345 } | |
2346 | |
2347 | |
2348 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { | 2341 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { |
2349 info()->MarkAsDeferredCalling(); | 2342 info()->MarkAsDeferredCalling(); |
2350 LOperand* size = instr->size()->IsConstant() | 2343 LOperand* size = instr->size()->IsConstant() |
2351 ? UseConstant(instr->size()) | 2344 ? UseConstant(instr->size()) |
2352 : UseTempRegister(instr->size()); | 2345 : UseTempRegister(instr->size()); |
2353 LOperand* temp = TempRegister(); | 2346 LOperand* temp = TempRegister(); |
2354 LAllocate* result = new(zone()) LAllocate(size, temp); | 2347 LAllocate* result = new(zone()) LAllocate(size, temp); |
2355 return AssignPointerMap(DefineAsRegister(result)); | 2348 return AssignPointerMap(DefineAsRegister(result)); |
2356 } | 2349 } |
2357 | 2350 |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2563 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2556 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2564 LOperand* object = UseRegister(instr->object()); | 2557 LOperand* object = UseRegister(instr->object()); |
2565 LOperand* index = UseTempRegister(instr->index()); | 2558 LOperand* index = UseTempRegister(instr->index()); |
2566 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2559 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2567 } | 2560 } |
2568 | 2561 |
2569 | 2562 |
2570 } } // namespace v8::internal | 2563 } } // namespace v8::internal |
2571 | 2564 |
2572 #endif // V8_TARGET_ARCH_X64 | 2565 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |