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 2298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2309 } | 2309 } |
2310 | 2310 |
2311 | 2311 |
2312 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { | 2312 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { |
2313 LOperand* char_code = UseRegister(instr->value()); | 2313 LOperand* char_code = UseRegister(instr->value()); |
2314 LStringCharFromCode* result = new(zone()) LStringCharFromCode(char_code); | 2314 LStringCharFromCode* result = new(zone()) LStringCharFromCode(char_code); |
2315 return AssignPointerMap(DefineAsRegister(result)); | 2315 return AssignPointerMap(DefineAsRegister(result)); |
2316 } | 2316 } |
2317 | 2317 |
2318 | 2318 |
2319 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { | |
2320 LOperand* string = UseRegisterAtStart(instr->value()); | |
2321 return DefineAsRegister(new(zone()) LStringLength(string)); | |
2322 } | |
2323 | |
2324 | |
2325 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { | 2319 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { |
2326 info()->MarkAsDeferredCalling(); | 2320 info()->MarkAsDeferredCalling(); |
2327 LOperand* size = instr->size()->IsConstant() | 2321 LOperand* size = instr->size()->IsConstant() |
2328 ? UseConstant(instr->size()) | 2322 ? UseConstant(instr->size()) |
2329 : UseTempRegister(instr->size()); | 2323 : UseTempRegister(instr->size()); |
2330 LOperand* temp1 = TempRegister(); | 2324 LOperand* temp1 = TempRegister(); |
2331 LOperand* temp2 = TempRegister(); | 2325 LOperand* temp2 = TempRegister(); |
2332 LAllocate* result = new(zone()) LAllocate(size, temp1, temp2); | 2326 LAllocate* result = new(zone()) LAllocate(size, temp1, temp2); |
2333 return AssignPointerMap(DefineAsRegister(result)); | 2327 return AssignPointerMap(DefineAsRegister(result)); |
2334 } | 2328 } |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2537 | 2531 |
2538 | 2532 |
2539 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2533 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2540 LOperand* object = UseRegister(instr->object()); | 2534 LOperand* object = UseRegister(instr->object()); |
2541 LOperand* index = UseRegister(instr->index()); | 2535 LOperand* index = UseRegister(instr->index()); |
2542 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2536 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2543 } | 2537 } |
2544 | 2538 |
2545 | 2539 |
2546 } } // namespace v8::internal | 2540 } } // namespace v8::internal |
OLD | NEW |