| 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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 break; | 497 break; |
| 498 } | 498 } |
| 499 } | 499 } |
| 500 #endif // DEBUG | 500 #endif // DEBUG |
| 501 | 501 |
| 502 | 502 |
| 503 // ----------------------------------------------------------------------------- | 503 // ----------------------------------------------------------------------------- |
| 504 // Implementation of ExternalReference | 504 // Implementation of ExternalReference |
| 505 | 505 |
| 506 ExternalReference::ExternalReference(Builtins::CFunctionId id) | 506 ExternalReference::ExternalReference(Builtins::CFunctionId id) |
| 507 : address_(Builtins::c_function_address(id)) {} | 507 : address_(Redirect(Builtins::c_function_address(id))) {} |
| 508 | 508 |
| 509 | 509 |
| 510 ExternalReference::ExternalReference(Builtins::Name name) | 510 ExternalReference::ExternalReference(Builtins::Name name) |
| 511 : address_(Builtins::builtin_address(name)) {} | 511 : address_(Builtins::builtin_address(name)) {} |
| 512 | 512 |
| 513 | 513 |
| 514 ExternalReference::ExternalReference(Runtime::FunctionId id) | 514 ExternalReference::ExternalReference(Runtime::FunctionId id) |
| 515 : address_(Runtime::FunctionForId(id)->entry) {} | 515 : address_(Redirect(Runtime::FunctionForId(id)->entry)) {} |
| 516 | 516 |
| 517 | 517 |
| 518 ExternalReference::ExternalReference(Runtime::Function* f) | 518 ExternalReference::ExternalReference(Runtime::Function* f) |
| 519 : address_(f->entry) {} | 519 : address_(Redirect(f->entry)) {} |
| 520 | 520 |
| 521 | 521 |
| 522 ExternalReference::ExternalReference(const IC_Utility& ic_utility) | 522 ExternalReference::ExternalReference(const IC_Utility& ic_utility) |
| 523 : address_(ic_utility.address()) {} | 523 : address_(Redirect(ic_utility.address())) {} |
| 524 | 524 |
| 525 #ifdef ENABLE_DEBUGGER_SUPPORT | 525 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 526 ExternalReference::ExternalReference(const Debug_Address& debug_address) | 526 ExternalReference::ExternalReference(const Debug_Address& debug_address) |
| 527 : address_(debug_address.address()) {} | 527 : address_(debug_address.address()) {} |
| 528 #endif | 528 #endif |
| 529 | 529 |
| 530 ExternalReference::ExternalReference(StatsCounter* counter) | 530 ExternalReference::ExternalReference(StatsCounter* counter) |
| 531 : address_(reinterpret_cast<Address>(counter->GetInternalPointer())) {} | 531 : address_(reinterpret_cast<Address>(counter->GetInternalPointer())) {} |
| 532 | 532 |
| 533 | 533 |
| 534 ExternalReference::ExternalReference(Top::AddressId id) | 534 ExternalReference::ExternalReference(Top::AddressId id) |
| 535 : address_(Top::get_address_from_id(id)) {} | 535 : address_(Top::get_address_from_id(id)) {} |
| 536 | 536 |
| 537 | 537 |
| 538 ExternalReference::ExternalReference(const SCTableReference& table_ref) | 538 ExternalReference::ExternalReference(const SCTableReference& table_ref) |
| 539 : address_(table_ref.address()) {} | 539 : address_(table_ref.address()) {} |
| 540 | 540 |
| 541 | 541 |
| 542 ExternalReference ExternalReference::perform_gc_function() { |
| 543 return ExternalReference(Redirect(FUNCTION_ADDR(Runtime::PerformGC))); |
| 544 } |
| 545 |
| 546 |
| 542 ExternalReference ExternalReference::builtin_passed_function() { | 547 ExternalReference ExternalReference::builtin_passed_function() { |
| 543 return ExternalReference(&Builtins::builtin_passed_function); | 548 return ExternalReference(&Builtins::builtin_passed_function); |
| 544 } | 549 } |
| 545 | 550 |
| 551 |
| 546 ExternalReference ExternalReference::the_hole_value_location() { | 552 ExternalReference ExternalReference::the_hole_value_location() { |
| 547 return ExternalReference(Factory::the_hole_value().location()); | 553 return ExternalReference(Factory::the_hole_value().location()); |
| 548 } | 554 } |
| 549 | 555 |
| 550 | 556 |
| 551 ExternalReference ExternalReference::address_of_stack_guard_limit() { | 557 ExternalReference ExternalReference::address_of_stack_guard_limit() { |
| 552 return ExternalReference(StackGuard::address_of_jslimit()); | 558 return ExternalReference(StackGuard::address_of_jslimit()); |
| 553 } | 559 } |
| 554 | 560 |
| 555 | 561 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 break; | 609 break; |
| 604 case Token::SUB: | 610 case Token::SUB: |
| 605 function = &sub_two_doubles; | 611 function = &sub_two_doubles; |
| 606 break; | 612 break; |
| 607 case Token::MUL: | 613 case Token::MUL: |
| 608 function = &mul_two_doubles; | 614 function = &mul_two_doubles; |
| 609 break; | 615 break; |
| 610 default: | 616 default: |
| 611 UNREACHABLE(); | 617 UNREACHABLE(); |
| 612 } | 618 } |
| 613 return ExternalReference(FUNCTION_ADDR(function)); | 619 // Passing true as 2nd parameter indicates that they return an fp value. |
| 620 return ExternalReference(Redirect(FUNCTION_ADDR(function), true)); |
| 614 } | 621 } |
| 615 | 622 |
| 616 | 623 |
| 624 ExternalReferenceRedirector* ExternalReference::redirector_ = NULL; |
| 625 |
| 626 |
| 617 #ifdef ENABLE_DEBUGGER_SUPPORT | 627 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 618 ExternalReference ExternalReference::debug_break() { | 628 ExternalReference ExternalReference::debug_break() { |
| 619 return ExternalReference(FUNCTION_ADDR(Debug::Break)); | 629 return ExternalReference(Redirect(FUNCTION_ADDR(Debug::Break))); |
| 620 } | 630 } |
| 621 | 631 |
| 622 | 632 |
| 623 ExternalReference ExternalReference::debug_step_in_fp_address() { | 633 ExternalReference ExternalReference::debug_step_in_fp_address() { |
| 624 return ExternalReference(Debug::step_in_fp_addr()); | 634 return ExternalReference(Debug::step_in_fp_addr()); |
| 625 } | 635 } |
| 626 #endif | 636 #endif |
| 627 | 637 |
| 628 } } // namespace v8::internal | 638 } } // namespace v8::internal |
| OLD | NEW |