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 2317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2328 LOperand* obj = UseFixed(instr->object(), a1); | 2328 LOperand* obj = UseFixed(instr->object(), a1); |
2329 LOperand* val = UseFixed(instr->value(), a0); | 2329 LOperand* val = UseFixed(instr->value(), a0); |
2330 | 2330 |
2331 LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val); | 2331 LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val); |
2332 return MarkAsCall(result, instr); | 2332 return MarkAsCall(result, instr); |
2333 } | 2333 } |
2334 | 2334 |
2335 | 2335 |
2336 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { | 2336 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { |
2337 LOperand* context = UseFixed(instr->context(), cp); | 2337 LOperand* context = UseFixed(instr->context(), cp); |
2338 LOperand* left = UseRegisterAtStart(instr->left()); | 2338 LOperand* left = FLAG_new_string_add |
2339 LOperand* right = UseRegisterAtStart(instr->right()); | 2339 ? UseFixed(instr->left(), a1) |
| 2340 : UseRegisterAtStart(instr->left()); |
| 2341 LOperand* right = FLAG_new_string_add |
| 2342 ? UseFixed(instr->right(), a0) |
| 2343 : UseRegisterAtStart(instr->right()); |
2340 return MarkAsCall( | 2344 return MarkAsCall( |
2341 DefineFixed(new(zone()) LStringAdd(context, left, right), v0), | 2345 DefineFixed(new(zone()) LStringAdd(context, left, right), v0), |
2342 instr); | 2346 instr); |
2343 } | 2347 } |
2344 | 2348 |
2345 | 2349 |
2346 LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) { | 2350 LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) { |
2347 LOperand* string = UseTempRegister(instr->string()); | 2351 LOperand* string = UseTempRegister(instr->string()); |
2348 LOperand* index = UseTempRegister(instr->index()); | 2352 LOperand* index = UseTempRegister(instr->index()); |
2349 LOperand* context = UseAny(instr->context()); | 2353 LOperand* context = UseAny(instr->context()); |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2590 | 2594 |
2591 | 2595 |
2592 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2596 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2593 LOperand* object = UseRegister(instr->object()); | 2597 LOperand* object = UseRegister(instr->object()); |
2594 LOperand* index = UseRegister(instr->index()); | 2598 LOperand* index = UseRegister(instr->index()); |
2595 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2599 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2596 } | 2600 } |
2597 | 2601 |
2598 | 2602 |
2599 } } // namespace v8::internal | 2603 } } // namespace v8::internal |
OLD | NEW |