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 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1289 LOperand* right = UseFixed(instr->right(), a0); | 1289 LOperand* right = UseFixed(instr->right(), a0); |
1290 LArithmeticT* result = new(zone()) LArithmeticT(instr->op(), left, right); | 1290 LArithmeticT* result = new(zone()) LArithmeticT(instr->op(), left, right); |
1291 return MarkAsCall(DefineFixed(result, v0), instr); | 1291 return MarkAsCall(DefineFixed(result, v0), instr); |
1292 } | 1292 } |
1293 } | 1293 } |
1294 | 1294 |
1295 | 1295 |
1296 LInstruction* LChunkBuilder::DoBitNot(HBitNot* instr) { | 1296 LInstruction* LChunkBuilder::DoBitNot(HBitNot* instr) { |
1297 ASSERT(instr->value()->representation().IsInteger32()); | 1297 ASSERT(instr->value()->representation().IsInteger32()); |
1298 ASSERT(instr->representation().IsInteger32()); | 1298 ASSERT(instr->representation().IsInteger32()); |
| 1299 if (instr->HasNoUses()) return NULL; |
1299 LOperand* value = UseRegisterAtStart(instr->value()); | 1300 LOperand* value = UseRegisterAtStart(instr->value()); |
1300 return DefineAsRegister(new(zone()) LBitNotI(value)); | 1301 return DefineAsRegister(new(zone()) LBitNotI(value)); |
1301 } | 1302 } |
1302 | 1303 |
1303 | 1304 |
1304 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { | 1305 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { |
1305 if (instr->representation().IsDouble()) { | 1306 if (instr->representation().IsDouble()) { |
1306 return DoArithmeticD(Token::DIV, instr); | 1307 return DoArithmeticD(Token::DIV, instr); |
1307 } else if (instr->representation().IsInteger32()) { | 1308 } else if (instr->representation().IsInteger32()) { |
1308 // TODO(1042) The fixed register allocation | 1309 // TODO(1042) The fixed register allocation |
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2335 | 2336 |
2336 | 2337 |
2337 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2338 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2338 LOperand* object = UseRegister(instr->object()); | 2339 LOperand* object = UseRegister(instr->object()); |
2339 LOperand* index = UseRegister(instr->index()); | 2340 LOperand* index = UseRegister(instr->index()); |
2340 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2341 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2341 } | 2342 } |
2342 | 2343 |
2343 | 2344 |
2344 } } // namespace v8::internal | 2345 } } // namespace v8::internal |
OLD | NEW |