| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1309 | 1309 |
| 1310 LInstruction* LChunkBuilder::DoBitNot(HBitNot* instr) { | 1310 LInstruction* LChunkBuilder::DoBitNot(HBitNot* instr) { |
| 1311 ASSERT(instr->value()->representation().IsInteger32()); | 1311 ASSERT(instr->value()->representation().IsInteger32()); |
| 1312 ASSERT(instr->representation().IsInteger32()); | 1312 ASSERT(instr->representation().IsInteger32()); |
| 1313 LOperand* input = UseRegisterAtStart(instr->value()); | 1313 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1314 LBitNotI* result = new LBitNotI(input); | 1314 LBitNotI* result = new LBitNotI(input); |
| 1315 return DefineSameAsFirst(result); | 1315 return DefineSameAsFirst(result); |
| 1316 } | 1316 } |
| 1317 | 1317 |
| 1318 | 1318 |
| 1319 LInstruction* LChunkBuilder::DoNeg(HNeg* instr) { | |
| 1320 Representation r = instr->representation(); | |
| 1321 if (r.IsInteger32()) { | |
| 1322 LOperand* input = UseRegister(instr->value()); | |
| 1323 LNegI* result = new LNegI(input); | |
| 1324 if (instr->CheckFlag(HValue::kBailoutOnMinusZero) || | |
| 1325 instr->CheckFlag(HValue::kCanOverflow)) { | |
| 1326 AssignEnvironment(result); | |
| 1327 } | |
| 1328 return DefineSameAsFirst(result); | |
| 1329 } else if (r.IsDouble()) { | |
| 1330 LOperand* input = UseRegister(instr->value()); | |
| 1331 LOperand* temp = TempRegister(); | |
| 1332 return DefineSameAsFirst(new LNegD(input, temp)); | |
| 1333 } else { | |
| 1334 ASSERT(r.IsTagged()); | |
| 1335 LOperand* input = UseFixed(instr->value(), eax); | |
| 1336 LNegT* result = new LNegT(input); | |
| 1337 return MarkAsCall(DefineFixed(result, eax), instr); | |
| 1338 } | |
| 1339 } | |
| 1340 | |
| 1341 | |
| 1342 LInstruction* LChunkBuilder::DoBitOr(HBitOr* instr) { | 1319 LInstruction* LChunkBuilder::DoBitOr(HBitOr* instr) { |
| 1343 return DoBit(Token::BIT_OR, instr); | 1320 return DoBit(Token::BIT_OR, instr); |
| 1344 } | 1321 } |
| 1345 | 1322 |
| 1346 | 1323 |
| 1347 LInstruction* LChunkBuilder::DoBitXor(HBitXor* instr) { | 1324 LInstruction* LChunkBuilder::DoBitXor(HBitXor* instr) { |
| 1348 return DoBit(Token::BIT_XOR, instr); | 1325 return DoBit(Token::BIT_XOR, instr); |
| 1349 } | 1326 } |
| 1350 | 1327 |
| 1351 | 1328 |
| (...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2058 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2035 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
| 2059 HEnvironment* outer = current_block_->last_environment()->outer(); | 2036 HEnvironment* outer = current_block_->last_environment()->outer(); |
| 2060 current_block_->UpdateEnvironment(outer); | 2037 current_block_->UpdateEnvironment(outer); |
| 2061 return NULL; | 2038 return NULL; |
| 2062 } | 2039 } |
| 2063 | 2040 |
| 2064 | 2041 |
| 2065 } } // namespace v8::internal | 2042 } } // namespace v8::internal |
| 2066 | 2043 |
| 2067 #endif // V8_TARGET_ARCH_IA32 | 2044 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |