Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Side by Side Diff: src/assembler.h

Issue 1457223005: Remove a bunch of Isolate::Current() callsites from simulators (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm64/simulator-arm64.cc ('k') | src/execution.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 // Call to accessor getter callback via InvokeAccessorGetterCallback. 859 // Call to accessor getter callback via InvokeAccessorGetterCallback.
860 // void f(Local<Name> property, PropertyCallbackInfo& info, 860 // void f(Local<Name> property, PropertyCallbackInfo& info,
861 // AccessorNameGetterCallback callback) 861 // AccessorNameGetterCallback callback)
862 PROFILING_GETTER_CALL 862 PROFILING_GETTER_CALL
863 }; 863 };
864 864
865 static void SetUp(); 865 static void SetUp();
866 static void InitializeMathExpData(); 866 static void InitializeMathExpData();
867 static void TearDownMathExpData(); 867 static void TearDownMathExpData();
868 868
869 typedef void* ExternalReferenceRedirector(void* original, Type type); 869 typedef void* ExternalReferenceRedirector(Isolate* isolate, void* original,
870 Type type);
870 871
871 ExternalReference() : address_(NULL) {} 872 ExternalReference() : address_(NULL) {}
872 873
873 ExternalReference(Builtins::CFunctionId id, Isolate* isolate); 874 ExternalReference(Builtins::CFunctionId id, Isolate* isolate);
874 875
875 ExternalReference(ApiFunction* ptr, Type type, Isolate* isolate); 876 ExternalReference(ApiFunction* ptr, Type type, Isolate* isolate);
876 877
877 ExternalReference(Builtins::Name name, Isolate* isolate); 878 ExternalReference(Builtins::Name name, Isolate* isolate);
878 879
879 ExternalReference(Runtime::FunctionId id, Isolate* isolate); 880 ExternalReference(Runtime::FunctionId id, Isolate* isolate);
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 explicit ExternalReference(void* address) 1037 explicit ExternalReference(void* address)
1037 : address_(address) {} 1038 : address_(address) {}
1038 1039
1039 static void* Redirect(Isolate* isolate, 1040 static void* Redirect(Isolate* isolate,
1040 Address address_arg, 1041 Address address_arg,
1041 Type type = ExternalReference::BUILTIN_CALL) { 1042 Type type = ExternalReference::BUILTIN_CALL) {
1042 ExternalReferenceRedirector* redirector = 1043 ExternalReferenceRedirector* redirector =
1043 reinterpret_cast<ExternalReferenceRedirector*>( 1044 reinterpret_cast<ExternalReferenceRedirector*>(
1044 isolate->external_reference_redirector()); 1045 isolate->external_reference_redirector());
1045 void* address = reinterpret_cast<void*>(address_arg); 1046 void* address = reinterpret_cast<void*>(address_arg);
1046 void* answer = (redirector == NULL) ? 1047 void* answer =
1047 address : 1048 (redirector == NULL) ? address : (*redirector)(isolate, address, type);
1048 (*redirector)(address, type);
1049 return answer; 1049 return answer;
1050 } 1050 }
1051 1051
1052 void* address_; 1052 void* address_;
1053 }; 1053 };
1054 1054
1055 bool operator==(ExternalReference, ExternalReference); 1055 bool operator==(ExternalReference, ExternalReference);
1056 bool operator!=(ExternalReference, ExternalReference); 1056 bool operator!=(ExternalReference, ExternalReference);
1057 1057
1058 size_t hash_value(ExternalReference); 1058 size_t hash_value(ExternalReference);
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 std::vector<ConstantPoolEntry> shared_entries; 1276 std::vector<ConstantPoolEntry> shared_entries;
1277 }; 1277 };
1278 1278
1279 Label emitted_label_; // Records pc_offset of emitted pool 1279 Label emitted_label_; // Records pc_offset of emitted pool
1280 PerTypeEntryInfo info_[ConstantPoolEntry::NUMBER_OF_TYPES]; 1280 PerTypeEntryInfo info_[ConstantPoolEntry::NUMBER_OF_TYPES];
1281 }; 1281 };
1282 1282
1283 } // namespace internal 1283 } // namespace internal
1284 } // namespace v8 1284 } // namespace v8
1285 #endif // V8_ASSEMBLER_H_ 1285 #endif // V8_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/arm64/simulator-arm64.cc ('k') | src/execution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698