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), instr, | |
Søren Thygesen Gjesse
2011/02/17 09:59:56
Please do either
MarkAsCall(
DefineFixedDouble
Karl Klose
2011/02/21 13:34:59
Done.
| |
1432 CAN_DEOPTIMIZE_EAGERLY); | |
1423 } | 1433 } |
1424 | 1434 |
1425 | 1435 |
1426 LInstruction* LChunkBuilder::DoCompare(HCompare* instr) { | 1436 LInstruction* LChunkBuilder::DoCompare(HCompare* instr) { |
1427 Token::Value op = instr->token(); | 1437 Token::Value op = instr->token(); |
1428 Representation r = instr->GetInputRepresentation(); | 1438 Representation r = instr->GetInputRepresentation(); |
1429 if (r.IsInteger32()) { | 1439 if (r.IsInteger32()) { |
1430 ASSERT(instr->left()->representation().IsInteger32()); | 1440 ASSERT(instr->left()->representation().IsInteger32()); |
1431 ASSERT(instr->right()->representation().IsInteger32()); | 1441 ASSERT(instr->right()->representation().IsInteger32()); |
1432 LOperand* left = UseRegisterAtStart(instr->left()); | 1442 LOperand* left = UseRegisterAtStart(instr->left()); |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2001 | 2011 |
2002 | 2012 |
2003 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2013 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
2004 HEnvironment* outer = current_block_->last_environment()->outer(); | 2014 HEnvironment* outer = current_block_->last_environment()->outer(); |
2005 current_block_->UpdateEnvironment(outer); | 2015 current_block_->UpdateEnvironment(outer); |
2006 return NULL; | 2016 return NULL; |
2007 } | 2017 } |
2008 | 2018 |
2009 | 2019 |
2010 } } // namespace v8::internal | 2020 } } // namespace v8::internal |
OLD | NEW |