| 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 2302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2313 } | 2313 } |
| 2314 | 2314 |
| 2315 | 2315 |
| 2316 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { | 2316 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { |
| 2317 LOperand* char_code = UseRegister(instr->value()); | 2317 LOperand* char_code = UseRegister(instr->value()); |
| 2318 LStringCharFromCode* result = new(zone()) LStringCharFromCode(char_code); | 2318 LStringCharFromCode* result = new(zone()) LStringCharFromCode(char_code); |
| 2319 return AssignPointerMap(DefineAsRegister(result)); | 2319 return AssignPointerMap(DefineAsRegister(result)); |
| 2320 } | 2320 } |
| 2321 | 2321 |
| 2322 | 2322 |
| 2323 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { | |
| 2324 LOperand* string = UseRegisterAtStart(instr->value()); | |
| 2325 return DefineAsRegister(new(zone()) LStringLength(string)); | |
| 2326 } | |
| 2327 | |
| 2328 | |
| 2329 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { | 2323 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { |
| 2330 info()->MarkAsDeferredCalling(); | 2324 info()->MarkAsDeferredCalling(); |
| 2331 LOperand* size = instr->size()->IsConstant() | 2325 LOperand* size = instr->size()->IsConstant() |
| 2332 ? UseConstant(instr->size()) | 2326 ? UseConstant(instr->size()) |
| 2333 : UseTempRegister(instr->size()); | 2327 : UseTempRegister(instr->size()); |
| 2334 LOperand* temp = TempRegister(); | 2328 LOperand* temp = TempRegister(); |
| 2335 LAllocate* result = new(zone()) LAllocate(size, temp); | 2329 LAllocate* result = new(zone()) LAllocate(size, temp); |
| 2336 return AssignPointerMap(DefineAsRegister(result)); | 2330 return AssignPointerMap(DefineAsRegister(result)); |
| 2337 } | 2331 } |
| 2338 | 2332 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2544 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2538 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2545 LOperand* object = UseRegister(instr->object()); | 2539 LOperand* object = UseRegister(instr->object()); |
| 2546 LOperand* index = UseTempRegister(instr->index()); | 2540 LOperand* index = UseTempRegister(instr->index()); |
| 2547 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2541 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2548 } | 2542 } |
| 2549 | 2543 |
| 2550 | 2544 |
| 2551 } } // namespace v8::internal | 2545 } } // namespace v8::internal |
| 2552 | 2546 |
| 2553 #endif // V8_TARGET_ARCH_X64 | 2547 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |