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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 // AccessorGetterCallback callback) | 677 // AccessorGetterCallback callback) |
678 PROFILING_GETTER_CALL_NEW | 678 PROFILING_GETTER_CALL_NEW |
679 }; | 679 }; |
680 | 680 |
681 static void SetUp(); | 681 static void SetUp(); |
682 static void InitializeMathExpData(); | 682 static void InitializeMathExpData(); |
683 static void TearDownMathExpData(); | 683 static void TearDownMathExpData(); |
684 | 684 |
685 typedef void* ExternalReferenceRedirector(void* original, Type type); | 685 typedef void* ExternalReferenceRedirector(void* original, Type type); |
686 | 686 |
687 ExternalReference() : address_(NULL) {} | |
688 | |
689 ExternalReference(Builtins::CFunctionId id, Isolate* isolate); | 687 ExternalReference(Builtins::CFunctionId id, Isolate* isolate); |
690 | 688 |
691 ExternalReference(ApiFunction* ptr, Type type, Isolate* isolate); | 689 ExternalReference(ApiFunction* ptr, Type type, Isolate* isolate); |
692 | 690 |
693 ExternalReference(Builtins::Name name, Isolate* isolate); | 691 ExternalReference(Builtins::Name name, Isolate* isolate); |
694 | 692 |
695 ExternalReference(Runtime::FunctionId id, Isolate* isolate); | 693 ExternalReference(Runtime::FunctionId id, Isolate* isolate); |
696 | 694 |
697 ExternalReference(const Runtime::Function* f, Isolate* isolate); | 695 ExternalReference(const Runtime::Function* f, Isolate* isolate); |
698 | 696 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 | 822 |
825 static ExternalReference math_exp_constants(int constant_index); | 823 static ExternalReference math_exp_constants(int constant_index); |
826 static ExternalReference math_exp_log_table(); | 824 static ExternalReference math_exp_log_table(); |
827 | 825 |
828 static ExternalReference page_flags(Page* page); | 826 static ExternalReference page_flags(Page* page); |
829 | 827 |
830 static ExternalReference ForDeoptEntry(Address entry); | 828 static ExternalReference ForDeoptEntry(Address entry); |
831 | 829 |
832 static ExternalReference cpu_features(); | 830 static ExternalReference cpu_features(); |
833 | 831 |
834 Address address() const { return reinterpret_cast<Address>(address_); } | 832 Address address() const {return reinterpret_cast<Address>(address_);} |
835 | 833 |
836 #ifdef ENABLE_DEBUGGER_SUPPORT | 834 #ifdef ENABLE_DEBUGGER_SUPPORT |
837 // Function Debug::Break() | 835 // Function Debug::Break() |
838 static ExternalReference debug_break(Isolate* isolate); | 836 static ExternalReference debug_break(Isolate* isolate); |
839 | 837 |
840 // Used to check if single stepping is enabled in generated code. | 838 // Used to check if single stepping is enabled in generated code. |
841 static ExternalReference debug_step_in_fp_address(Isolate* isolate); | 839 static ExternalReference debug_step_in_fp_address(Isolate* isolate); |
842 #endif | 840 #endif |
843 | 841 |
844 #ifndef V8_INTERPRETED_REGEXP | 842 #ifndef V8_INTERPRETED_REGEXP |
(...skipping 18 matching lines...) Expand all Loading... |
863 static void set_redirector(Isolate* isolate, | 861 static void set_redirector(Isolate* isolate, |
864 ExternalReferenceRedirector* redirector) { | 862 ExternalReferenceRedirector* redirector) { |
865 // We can't stack them. | 863 // We can't stack them. |
866 ASSERT(isolate->external_reference_redirector() == NULL); | 864 ASSERT(isolate->external_reference_redirector() == NULL); |
867 isolate->set_external_reference_redirector( | 865 isolate->set_external_reference_redirector( |
868 reinterpret_cast<ExternalReferenceRedirectorPointer*>(redirector)); | 866 reinterpret_cast<ExternalReferenceRedirectorPointer*>(redirector)); |
869 } | 867 } |
870 | 868 |
871 static ExternalReference stress_deopt_count(Isolate* isolate); | 869 static ExternalReference stress_deopt_count(Isolate* isolate); |
872 | 870 |
873 bool operator==(const ExternalReference& other) const { | |
874 return address_ == other.address_; | |
875 } | |
876 | |
877 bool operator!=(const ExternalReference& other) const { | |
878 return !(*this == other); | |
879 } | |
880 | |
881 private: | 871 private: |
882 explicit ExternalReference(void* address) | 872 explicit ExternalReference(void* address) |
883 : address_(address) {} | 873 : address_(address) {} |
884 | 874 |
885 static void* Redirect(Isolate* isolate, | 875 static void* Redirect(Isolate* isolate, |
886 void* address, | 876 void* address, |
887 Type type = ExternalReference::BUILTIN_CALL) { | 877 Type type = ExternalReference::BUILTIN_CALL) { |
888 ExternalReferenceRedirector* redirector = | 878 ExternalReferenceRedirector* redirector = |
889 reinterpret_cast<ExternalReferenceRedirector*>( | 879 reinterpret_cast<ExternalReferenceRedirector*>( |
890 isolate->external_reference_redirector()); | 880 isolate->external_reference_redirector()); |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 public: | 1064 public: |
1075 NullCallWrapper() { } | 1065 NullCallWrapper() { } |
1076 virtual ~NullCallWrapper() { } | 1066 virtual ~NullCallWrapper() { } |
1077 virtual void BeforeCall(int call_size) const { } | 1067 virtual void BeforeCall(int call_size) const { } |
1078 virtual void AfterCall() const { } | 1068 virtual void AfterCall() const { } |
1079 }; | 1069 }; |
1080 | 1070 |
1081 } } // namespace v8::internal | 1071 } } // namespace v8::internal |
1082 | 1072 |
1083 #endif // V8_ASSEMBLER_H_ | 1073 #endif // V8_ASSEMBLER_H_ |
OLD | NEW |