| 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 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1411 } else if (instr->representation().IsDouble()) { | 1411 } else if (instr->representation().IsDouble()) { |
| 1412 return DoArithmeticD(Token::ADD, instr); | 1412 return DoArithmeticD(Token::ADD, instr); |
| 1413 } else { | 1413 } else { |
| 1414 ASSERT(instr->representation().IsTagged()); | 1414 ASSERT(instr->representation().IsTagged()); |
| 1415 return DoArithmeticT(Token::ADD, instr); | 1415 return DoArithmeticT(Token::ADD, instr); |
| 1416 } | 1416 } |
| 1417 } | 1417 } |
| 1418 | 1418 |
| 1419 | 1419 |
| 1420 LInstruction* LChunkBuilder::DoPower(HPower* instr) { | 1420 LInstruction* LChunkBuilder::DoPower(HPower* instr) { |
| 1421 Abort("LPower instruction not implemented on ARM"); | 1421 ASSERT(instr->representation().IsDouble()); |
| 1422 return NULL; | 1422 // We call a C function for double power. It can't trigger a GC. |
| 1423 // We need to use fixed result register for the call. |
| 1424 Representation exponent_type = instr->right()->representation(); |
| 1425 ASSERT(instr->left()->representation().IsDouble()); |
| 1426 LOperand* left = UseFixedDouble(instr->left(), d1); |
| 1427 LOperand* right = exponent_type.IsDouble() ? |
| 1428 UseFixedDouble(instr->right(), d2) : |
| 1429 UseFixed(instr->right(), r0); |
| 1430 LPower* result = new LPower(left, right); |
| 1431 return MarkAsCall(DefineFixedDouble(result, d3), |
| 1432 instr, |
| 1433 CAN_DEOPTIMIZE_EAGERLY); |
| 1423 } | 1434 } |
| 1424 | 1435 |
| 1425 | 1436 |
| 1426 LInstruction* LChunkBuilder::DoCompare(HCompare* instr) { | 1437 LInstruction* LChunkBuilder::DoCompare(HCompare* instr) { |
| 1427 Token::Value op = instr->token(); | 1438 Token::Value op = instr->token(); |
| 1428 Representation r = instr->GetInputRepresentation(); | 1439 Representation r = instr->GetInputRepresentation(); |
| 1429 if (r.IsInteger32()) { | 1440 if (r.IsInteger32()) { |
| 1430 ASSERT(instr->left()->representation().IsInteger32()); | 1441 ASSERT(instr->left()->representation().IsInteger32()); |
| 1431 ASSERT(instr->right()->representation().IsInteger32()); | 1442 ASSERT(instr->right()->representation().IsInteger32()); |
| 1432 LOperand* left = UseRegisterAtStart(instr->left()); | 1443 LOperand* left = UseRegisterAtStart(instr->left()); |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2001 | 2012 |
| 2002 | 2013 |
| 2003 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2014 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
| 2004 HEnvironment* outer = current_block_->last_environment()->outer(); | 2015 HEnvironment* outer = current_block_->last_environment()->outer(); |
| 2005 current_block_->UpdateEnvironment(outer); | 2016 current_block_->UpdateEnvironment(outer); |
| 2006 return NULL; | 2017 return NULL; |
| 2007 } | 2018 } |
| 2008 | 2019 |
| 2009 | 2020 |
| 2010 } } // namespace v8::internal | 2021 } } // namespace v8::internal |
| OLD | NEW |