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 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1321 LOperand* context = UseFixed(instr->context(), cp); | 1321 LOperand* context = UseFixed(instr->context(), cp); |
1322 LOperand* constructor = UseFixed(instr->constructor(), r1); | 1322 LOperand* constructor = UseFixed(instr->constructor(), r1); |
1323 LCallNewArray* result = new(zone()) LCallNewArray(context, constructor); | 1323 LCallNewArray* result = new(zone()) LCallNewArray(context, constructor); |
1324 return MarkAsCall(DefineFixed(result, r0), instr); | 1324 return MarkAsCall(DefineFixed(result, r0), instr); |
1325 } | 1325 } |
1326 | 1326 |
1327 | 1327 |
1328 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { | 1328 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { |
1329 LOperand* context = UseFixed(instr->context(), cp); | 1329 LOperand* context = UseFixed(instr->context(), cp); |
1330 LOperand* function = UseFixed(instr->function(), r1); | 1330 LOperand* function = UseFixed(instr->function(), r1); |
1331 return MarkAsCall( | 1331 LCallFunction* call = new(zone()) LCallFunction(context, function); |
1332 DefineFixed(new(zone()) LCallFunction(context, function), r0), instr); | 1332 LInstruction* result = DefineFixed(call, r0); |
| 1333 if (instr->IsTailCall()) return result; |
| 1334 return MarkAsCall(result, instr); |
1333 } | 1335 } |
1334 | 1336 |
1335 | 1337 |
1336 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { | 1338 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { |
1337 LOperand* context = UseFixed(instr->context(), cp); | 1339 LOperand* context = UseFixed(instr->context(), cp); |
1338 return MarkAsCall(DefineFixed(new(zone()) LCallRuntime(context), r0), instr); | 1340 return MarkAsCall(DefineFixed(new(zone()) LCallRuntime(context), r0), instr); |
1339 } | 1341 } |
1340 | 1342 |
1341 | 1343 |
1342 LInstruction* LChunkBuilder::DoRor(HRor* instr) { | 1344 LInstruction* LChunkBuilder::DoRor(HRor* instr) { |
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2682 | 2684 |
2683 | 2685 |
2684 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2686 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2685 LOperand* object = UseRegister(instr->object()); | 2687 LOperand* object = UseRegister(instr->object()); |
2686 LOperand* index = UseRegister(instr->index()); | 2688 LOperand* index = UseRegister(instr->index()); |
2687 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2689 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2688 } | 2690 } |
2689 | 2691 |
2690 | 2692 |
2691 } } // namespace v8::internal | 2693 } } // namespace v8::internal |
OLD | NEW |