| 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 2375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2386 } | 2386 } |
| 2387 | 2387 |
| 2388 | 2388 |
| 2389 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { | 2389 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { |
| 2390 LOperand* char_code = UseRegister(instr->value()); | 2390 LOperand* char_code = UseRegister(instr->value()); |
| 2391 LStringCharFromCode* result = new(zone()) LStringCharFromCode(char_code); | 2391 LStringCharFromCode* result = new(zone()) LStringCharFromCode(char_code); |
| 2392 return AssignPointerMap(DefineAsRegister(result)); | 2392 return AssignPointerMap(DefineAsRegister(result)); |
| 2393 } | 2393 } |
| 2394 | 2394 |
| 2395 | 2395 |
| 2396 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { | |
| 2397 LOperand* string = UseRegisterAtStart(instr->value()); | |
| 2398 return DefineAsRegister(new(zone()) LStringLength(string)); | |
| 2399 } | |
| 2400 | |
| 2401 | |
| 2402 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { | 2396 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { |
| 2403 info()->MarkAsDeferredCalling(); | 2397 info()->MarkAsDeferredCalling(); |
| 2404 LOperand* size = instr->size()->IsConstant() | 2398 LOperand* size = instr->size()->IsConstant() |
| 2405 ? UseConstant(instr->size()) | 2399 ? UseConstant(instr->size()) |
| 2406 : UseTempRegister(instr->size()); | 2400 : UseTempRegister(instr->size()); |
| 2407 LOperand* temp1 = TempRegister(); | 2401 LOperand* temp1 = TempRegister(); |
| 2408 LOperand* temp2 = TempRegister(); | 2402 LOperand* temp2 = TempRegister(); |
| 2409 LAllocate* result = new(zone()) LAllocate(size, temp1, temp2); | 2403 LAllocate* result = new(zone()) LAllocate(size, temp1, temp2); |
| 2410 return AssignPointerMap(DefineAsRegister(result)); | 2404 return AssignPointerMap(DefineAsRegister(result)); |
| 2411 } | 2405 } |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2614 | 2608 |
| 2615 | 2609 |
| 2616 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2610 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2617 LOperand* object = UseRegister(instr->object()); | 2611 LOperand* object = UseRegister(instr->object()); |
| 2618 LOperand* index = UseRegister(instr->index()); | 2612 LOperand* index = UseRegister(instr->index()); |
| 2619 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2613 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2620 } | 2614 } |
| 2621 | 2615 |
| 2622 | 2616 |
| 2623 } } // namespace v8::internal | 2617 } } // namespace v8::internal |
| OLD | NEW |