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 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1323 LOperand* context = UseFixed(instr->context(), cp); | 1323 LOperand* context = UseFixed(instr->context(), cp); |
1324 LOperand* constructor = UseFixed(instr->constructor(), a1); | 1324 LOperand* constructor = UseFixed(instr->constructor(), a1); |
1325 LCallNewArray* result = new(zone()) LCallNewArray(context, constructor); | 1325 LCallNewArray* result = new(zone()) LCallNewArray(context, constructor); |
1326 return MarkAsCall(DefineFixed(result, v0), instr); | 1326 return MarkAsCall(DefineFixed(result, v0), instr); |
1327 } | 1327 } |
1328 | 1328 |
1329 | 1329 |
1330 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { | 1330 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { |
1331 LOperand* context = UseFixed(instr->context(), cp); | 1331 LOperand* context = UseFixed(instr->context(), cp); |
1332 LOperand* function = UseFixed(instr->function(), a1); | 1332 LOperand* function = UseFixed(instr->function(), a1); |
1333 return MarkAsCall( | 1333 LCallFunction* call = new(zone()) LCallFunction(context, function); |
1334 DefineFixed(new(zone()) LCallFunction(context, function), v0), instr); | 1334 LInstruction* result = DefineFixed(call, v0); |
| 1335 if (instr->IsTailCall()) return result; |
| 1336 return MarkAsCall(result, instr); |
1335 } | 1337 } |
1336 | 1338 |
1337 | 1339 |
1338 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { | 1340 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { |
1339 LOperand* context = UseFixed(instr->context(), cp); | 1341 LOperand* context = UseFixed(instr->context(), cp); |
1340 return MarkAsCall(DefineFixed(new(zone()) LCallRuntime(context), v0), instr); | 1342 return MarkAsCall(DefineFixed(new(zone()) LCallRuntime(context), v0), instr); |
1341 } | 1343 } |
1342 | 1344 |
1343 | 1345 |
1344 LInstruction* LChunkBuilder::DoRor(HRor* instr) { | 1346 LInstruction* LChunkBuilder::DoRor(HRor* instr) { |
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2604 | 2606 |
2605 | 2607 |
2606 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2608 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2607 LOperand* object = UseRegister(instr->object()); | 2609 LOperand* object = UseRegister(instr->object()); |
2608 LOperand* index = UseRegister(instr->index()); | 2610 LOperand* index = UseRegister(instr->index()); |
2609 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2611 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2610 } | 2612 } |
2611 | 2613 |
2612 | 2614 |
2613 } } // namespace v8::internal | 2615 } } // namespace v8::internal |
OLD | NEW |