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 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1278 LOperand* right = UseFixed(instr->right(), rax); | 1278 LOperand* right = UseFixed(instr->right(), rax); |
1279 LArithmeticT* result = new(zone()) LArithmeticT(instr->op(), left, right); | 1279 LArithmeticT* result = new(zone()) LArithmeticT(instr->op(), left, right); |
1280 return MarkAsCall(DefineFixed(result, rax), instr); | 1280 return MarkAsCall(DefineFixed(result, rax), instr); |
1281 } | 1281 } |
1282 } | 1282 } |
1283 | 1283 |
1284 | 1284 |
1285 LInstruction* LChunkBuilder::DoBitNot(HBitNot* instr) { | 1285 LInstruction* LChunkBuilder::DoBitNot(HBitNot* instr) { |
1286 ASSERT(instr->value()->representation().IsInteger32()); | 1286 ASSERT(instr->value()->representation().IsInteger32()); |
1287 ASSERT(instr->representation().IsInteger32()); | 1287 ASSERT(instr->representation().IsInteger32()); |
| 1288 if (instr->HasNoUses()) return NULL; |
1288 LOperand* input = UseRegisterAtStart(instr->value()); | 1289 LOperand* input = UseRegisterAtStart(instr->value()); |
1289 LBitNotI* result = new(zone()) LBitNotI(input); | 1290 LBitNotI* result = new(zone()) LBitNotI(input); |
1290 return DefineSameAsFirst(result); | 1291 return DefineSameAsFirst(result); |
1291 } | 1292 } |
1292 | 1293 |
1293 | 1294 |
1294 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { | 1295 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { |
1295 if (instr->representation().IsDouble()) { | 1296 if (instr->representation().IsDouble()) { |
1296 return DoArithmeticD(Token::DIV, instr); | 1297 return DoArithmeticD(Token::DIV, instr); |
1297 } else if (instr->representation().IsInteger32()) { | 1298 } else if (instr->representation().IsInteger32()) { |
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2330 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2331 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2331 LOperand* object = UseRegister(instr->object()); | 2332 LOperand* object = UseRegister(instr->object()); |
2332 LOperand* index = UseTempRegister(instr->index()); | 2333 LOperand* index = UseTempRegister(instr->index()); |
2333 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2334 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2334 } | 2335 } |
2335 | 2336 |
2336 | 2337 |
2337 } } // namespace v8::internal | 2338 } } // namespace v8::internal |
2338 | 2339 |
2339 #endif // V8_TARGET_ARCH_X64 | 2340 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |