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

Unified Diff: src/ic/x87/access-compiler-x87.cc

Issue 2389313002: Avoid static initializers in PropertyAccessCompiler (Closed)
Patch Set: Ports Created 4 years, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ic/x64/access-compiler-x64.cc ('k') | src/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/x87/access-compiler-x87.cc
diff --git a/src/ic/x87/access-compiler-x87.cc b/src/ic/x87/access-compiler-x87.cc
index e528de65baf511c1cd4eae3bc4daea21c96c5dc5..d1867553cd83b9a320d7d0a17632720a86066227 100644
--- a/src/ic/x87/access-compiler-x87.cc
+++ b/src/ic/x87/access-compiler-x87.cc
@@ -16,22 +16,21 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
__ jmp(code, RelocInfo::CODE_TARGET);
}
-
-Register* PropertyAccessCompiler::load_calling_convention() {
- // receiver, name, scratch1, scratch2, scratch3.
+void PropertyAccessCompiler::InitializePlatformSpecific(
+ AccessCompilerData* data) {
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
- static Register registers[] = {receiver, name, ebx, eax, edi};
- return registers;
-}
+ // Load calling convention.
+ // receiver, name, scratch1, scratch2, scratch3.
+ Register load_registers[] = {receiver, name, ebx, eax, edi};
-Register* PropertyAccessCompiler::store_calling_convention() {
+ // Store calling convention.
// receiver, name, scratch1, scratch2.
- Register receiver = StoreDescriptor::ReceiverRegister();
- Register name = StoreDescriptor::NameRegister();
- static Register registers[] = {receiver, name, ebx, edi};
- return registers;
+ Register store_registers[] = {receiver, name, ebx, edi};
+
+ data->Initialize(arraysize(load_registers), load_registers,
+ arraysize(store_registers), store_registers);
}
#undef __
« no previous file with comments | « src/ic/x64/access-compiler-x64.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698