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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 #endif // DEBUG | 546 #endif // DEBUG |
547 | 547 |
548 | 548 |
549 // ----------------------------------------------------------------------------- | 549 // ----------------------------------------------------------------------------- |
550 // Implementation of ExternalReference | 550 // Implementation of ExternalReference |
551 | 551 |
552 ExternalReference::ExternalReference(Builtins::CFunctionId id) | 552 ExternalReference::ExternalReference(Builtins::CFunctionId id) |
553 : address_(Redirect(Builtins::c_function_address(id))) {} | 553 : address_(Redirect(Builtins::c_function_address(id))) {} |
554 | 554 |
555 | 555 |
556 ExternalReference::ExternalReference(ApiFunction* fun) | 556 ExternalReference::ExternalReference( |
557 : address_(Redirect(fun->address())) {} | 557 ApiFunction* fun, Type type = ExternalReference::BUILTIN_CALL) |
| 558 : address_(Redirect(fun->address(), type)) {} |
558 | 559 |
559 | 560 |
560 ExternalReference::ExternalReference(Builtins::Name name) | 561 ExternalReference::ExternalReference(Builtins::Name name) |
561 : address_(Builtins::builtin_address(name)) {} | 562 : address_(Builtins::builtin_address(name)) {} |
562 | 563 |
563 | 564 |
564 ExternalReference::ExternalReference(Runtime::FunctionId id) | 565 ExternalReference::ExternalReference(Runtime::FunctionId id) |
565 : address_(Redirect(Runtime::FunctionForId(id)->entry)) {} | 566 : address_(Redirect(Runtime::FunctionForId(id)->entry)) {} |
566 | 567 |
567 | 568 |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
881 case Token::DIV: | 882 case Token::DIV: |
882 function = &div_two_doubles; | 883 function = &div_two_doubles; |
883 break; | 884 break; |
884 case Token::MOD: | 885 case Token::MOD: |
885 function = &mod_two_doubles; | 886 function = &mod_two_doubles; |
886 break; | 887 break; |
887 default: | 888 default: |
888 UNREACHABLE(); | 889 UNREACHABLE(); |
889 } | 890 } |
890 // Passing true as 2nd parameter indicates that they return an fp value. | 891 // Passing true as 2nd parameter indicates that they return an fp value. |
891 return ExternalReference(Redirect(FUNCTION_ADDR(function), true)); | 892 return ExternalReference(Redirect(FUNCTION_ADDR(function), FP_RETURN_CALL)); |
892 } | 893 } |
893 | 894 |
894 | 895 |
895 ExternalReference ExternalReference::compare_doubles() { | 896 ExternalReference ExternalReference::compare_doubles() { |
896 return ExternalReference(Redirect(FUNCTION_ADDR(native_compare_doubles), | 897 return ExternalReference(Redirect(FUNCTION_ADDR(native_compare_doubles), |
897 false)); | 898 BUILTIN_CALL)); |
898 } | 899 } |
899 | 900 |
900 | 901 |
| 902 ExternalReference:: |
901 ExternalReferenceRedirector* ExternalReference::redirector_ = NULL; | 903 ExternalReferenceRedirector* ExternalReference::redirector_ = NULL; |
902 | 904 |
903 | 905 |
904 #ifdef ENABLE_DEBUGGER_SUPPORT | 906 #ifdef ENABLE_DEBUGGER_SUPPORT |
905 ExternalReference ExternalReference::debug_break() { | 907 ExternalReference ExternalReference::debug_break() { |
906 return ExternalReference(Redirect(FUNCTION_ADDR(Debug::Break))); | 908 return ExternalReference(Redirect(FUNCTION_ADDR(Debug::Break))); |
907 } | 909 } |
908 | 910 |
909 | 911 |
910 ExternalReference ExternalReference::debug_step_in_fp_address() { | 912 ExternalReference ExternalReference::debug_step_in_fp_address() { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 960 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
959 state_.written_position = state_.current_position; | 961 state_.written_position = state_.current_position; |
960 written = true; | 962 written = true; |
961 } | 963 } |
962 | 964 |
963 // Return whether something was written. | 965 // Return whether something was written. |
964 return written; | 966 return written; |
965 } | 967 } |
966 | 968 |
967 } } // namespace v8::internal | 969 } } // namespace v8::internal |
OLD | NEW |