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 2245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2256 return AssignPointerMap(DefineAsRegister(result)); | 2256 return AssignPointerMap(DefineAsRegister(result)); |
2257 } | 2257 } |
2258 | 2258 |
2259 | 2259 |
2260 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { | 2260 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { |
2261 LOperand* string = UseRegisterAtStart(instr->value()); | 2261 LOperand* string = UseRegisterAtStart(instr->value()); |
2262 return DefineAsRegister(new(zone()) LStringLength(string)); | 2262 return DefineAsRegister(new(zone()) LStringLength(string)); |
2263 } | 2263 } |
2264 | 2264 |
2265 | 2265 |
2266 LInstruction* LChunkBuilder::DoAllocateObject(HAllocateObject* instr) { | |
2267 info()->MarkAsDeferredCalling(); | |
2268 LAllocateObject* result = | |
2269 new(zone()) LAllocateObject(TempRegister(), TempRegister()); | |
2270 return AssignPointerMap(DefineAsRegister(result)); | |
2271 } | |
2272 | |
2273 | |
2274 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { | 2266 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { |
2275 info()->MarkAsDeferredCalling(); | 2267 info()->MarkAsDeferredCalling(); |
2276 LOperand* size = instr->size()->IsConstant() | 2268 LOperand* size = instr->size()->IsConstant() |
2277 ? UseConstant(instr->size()) | 2269 ? UseConstant(instr->size()) |
2278 : UseTempRegister(instr->size()); | 2270 : UseTempRegister(instr->size()); |
2279 LOperand* temp1 = TempRegister(); | 2271 LOperand* temp1 = TempRegister(); |
2280 LOperand* temp2 = TempRegister(); | 2272 LOperand* temp2 = TempRegister(); |
2281 LAllocate* result = new(zone()) LAllocate(size, temp1, temp2); | 2273 LAllocate* result = new(zone()) LAllocate(size, temp1, temp2); |
2282 return AssignPointerMap(DefineAsRegister(result)); | 2274 return AssignPointerMap(DefineAsRegister(result)); |
2283 } | 2275 } |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2501 | 2493 |
2502 | 2494 |
2503 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2495 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2504 LOperand* object = UseRegister(instr->object()); | 2496 LOperand* object = UseRegister(instr->object()); |
2505 LOperand* index = UseRegister(instr->index()); | 2497 LOperand* index = UseRegister(instr->index()); |
2506 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2498 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2507 } | 2499 } |
2508 | 2500 |
2509 | 2501 |
2510 } } // namespace v8::internal | 2502 } } // namespace v8::internal |
OLD | NEW |