| OLD | NEW |
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 } | 575 } |
| 576 | 576 |
| 577 ExternalReference ExternalReference::new_space_allocation_limit_address() { | 577 ExternalReference ExternalReference::new_space_allocation_limit_address() { |
| 578 return ExternalReference(Heap::NewSpaceAllocationLimitAddress()); | 578 return ExternalReference(Heap::NewSpaceAllocationLimitAddress()); |
| 579 } | 579 } |
| 580 | 580 |
| 581 ExternalReference ExternalReference::debug_step_in_fp_address() { | 581 ExternalReference ExternalReference::debug_step_in_fp_address() { |
| 582 return ExternalReference(Debug::step_in_fp_addr()); | 582 return ExternalReference(Debug::step_in_fp_addr()); |
| 583 } | 583 } |
| 584 | 584 |
| 585 |
| 586 static double add_two_doubles(double x, double y) { |
| 587 return x + y; |
| 588 } |
| 589 |
| 590 |
| 591 static double sub_two_doubles(double x, double y) { |
| 592 return x - y; |
| 593 } |
| 594 |
| 595 |
| 596 static double mul_two_doubles(double x, double y) { |
| 597 return x * y; |
| 598 } |
| 599 |
| 600 |
| 601 ExternalReference ExternalReference::double_fp_operation( |
| 602 Token::Value operation) { |
| 603 typedef double BinaryFPOperation(double x, double y); |
| 604 BinaryFPOperation* function = NULL; |
| 605 switch (operation) { |
| 606 case Token::ADD: |
| 607 function = &add_two_doubles; |
| 608 break; |
| 609 case Token::SUB: |
| 610 function = &sub_two_doubles; |
| 611 break; |
| 612 case Token::MUL: |
| 613 function = &mul_two_doubles; |
| 614 break; |
| 615 default: |
| 616 UNREACHABLE(); |
| 617 } |
| 618 return ExternalReference(FUNCTION_ADDR(function)); |
| 619 } |
| 620 |
| 585 } } // namespace v8::internal | 621 } } // namespace v8::internal |
| OLD | NEW |