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

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 9666052: Landing for pliard@chromium.org: Remove static initializers in v8. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x64/disasm-x64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 5973 matching lines...) Expand 10 before | Expand all | Expand 10 after
5984 __ ret(2 * kPointerSize); 5984 __ ret(2 * kPointerSize);
5985 } 5985 }
5986 5986
5987 5987
5988 struct AheadOfTimeWriteBarrierStubList { 5988 struct AheadOfTimeWriteBarrierStubList {
5989 Register object, value, address; 5989 Register object, value, address;
5990 RememberedSetAction action; 5990 RememberedSetAction action;
5991 }; 5991 };
5992 5992
5993 5993
5994 #define REG(Name) { kRegister_ ## Name ## _Code }
5995
5994 struct AheadOfTimeWriteBarrierStubList kAheadOfTime[] = { 5996 struct AheadOfTimeWriteBarrierStubList kAheadOfTime[] = {
5995 // Used in RegExpExecStub. 5997 // Used in RegExpExecStub.
5996 { rbx, rax, rdi, EMIT_REMEMBERED_SET }, 5998 { REG(rbx), REG(rax), REG(rdi), EMIT_REMEMBERED_SET },
5997 // Used in CompileArrayPushCall. 5999 // Used in CompileArrayPushCall.
5998 { rbx, rcx, rdx, EMIT_REMEMBERED_SET }, 6000 { REG(rbx), REG(rcx), REG(rdx), EMIT_REMEMBERED_SET },
5999 // Used in CompileStoreGlobal. 6001 // Used in CompileStoreGlobal.
6000 { rbx, rcx, rdx, OMIT_REMEMBERED_SET }, 6002 { REG(rbx), REG(rcx), REG(rdx), OMIT_REMEMBERED_SET },
6001 // Used in StoreStubCompiler::CompileStoreField and 6003 // Used in StoreStubCompiler::CompileStoreField and
6002 // KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField. 6004 // KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField.
6003 { rdx, rcx, rbx, EMIT_REMEMBERED_SET }, 6005 { REG(rdx), REG(rcx), REG(rbx), EMIT_REMEMBERED_SET },
6004 // GenerateStoreField calls the stub with two different permutations of 6006 // GenerateStoreField calls the stub with two different permutations of
6005 // registers. This is the second. 6007 // registers. This is the second.
6006 { rbx, rcx, rdx, EMIT_REMEMBERED_SET }, 6008 { REG(rbx), REG(rcx), REG(rdx), EMIT_REMEMBERED_SET },
6007 // StoreIC::GenerateNormal via GenerateDictionaryStore. 6009 // StoreIC::GenerateNormal via GenerateDictionaryStore.
6008 { rbx, r8, r9, EMIT_REMEMBERED_SET }, 6010 { REG(rbx), REG(r8), REG(r9), EMIT_REMEMBERED_SET },
6009 // KeyedStoreIC::GenerateGeneric. 6011 // KeyedStoreIC::GenerateGeneric.
6010 { rbx, rdx, rcx, EMIT_REMEMBERED_SET}, 6012 { REG(rbx), REG(rdx), REG(rcx), EMIT_REMEMBERED_SET},
6011 // KeyedStoreStubCompiler::GenerateStoreFastElement. 6013 // KeyedStoreStubCompiler::GenerateStoreFastElement.
6012 { rdi, rbx, rcx, EMIT_REMEMBERED_SET}, 6014 { REG(rdi), REG(rbx), REG(rcx), EMIT_REMEMBERED_SET},
6013 { rdx, rdi, rbx, EMIT_REMEMBERED_SET}, 6015 { REG(rdx), REG(rdi), REG(rbx), EMIT_REMEMBERED_SET},
6014 // ElementsTransitionGenerator::GenerateSmiOnlyToObject 6016 // ElementsTransitionGenerator::GenerateSmiOnlyToObject
6015 // and ElementsTransitionGenerator::GenerateSmiOnlyToObject 6017 // and ElementsTransitionGenerator::GenerateSmiOnlyToObject
6016 // and ElementsTransitionGenerator::GenerateDoubleToObject 6018 // and ElementsTransitionGenerator::GenerateDoubleToObject
6017 { rdx, rbx, rdi, EMIT_REMEMBERED_SET}, 6019 { REG(rdx), REG(rbx), REG(rdi), EMIT_REMEMBERED_SET},
6018 { rdx, rbx, rdi, OMIT_REMEMBERED_SET}, 6020 { REG(rdx), REG(rbx), REG(rdi), OMIT_REMEMBERED_SET},
6019 // ElementsTransitionGenerator::GenerateSmiOnlyToDouble 6021 // ElementsTransitionGenerator::GenerateSmiOnlyToDouble
6020 // and ElementsTransitionGenerator::GenerateDoubleToObject 6022 // and ElementsTransitionGenerator::GenerateDoubleToObject
6021 { rdx, r11, r15, EMIT_REMEMBERED_SET}, 6023 { REG(rdx), REG(r11), REG(r15), EMIT_REMEMBERED_SET},
6022 // ElementsTransitionGenerator::GenerateDoubleToObject 6024 // ElementsTransitionGenerator::GenerateDoubleToObject
6023 { r11, rax, r15, EMIT_REMEMBERED_SET}, 6025 { REG(r11), REG(rax), REG(r15), EMIT_REMEMBERED_SET},
6024 // StoreArrayLiteralElementStub::Generate 6026 // StoreArrayLiteralElementStub::Generate
6025 { rbx, rax, rcx, EMIT_REMEMBERED_SET}, 6027 { REG(rbx), REG(rax), REG(rcx), EMIT_REMEMBERED_SET},
6026 // Null termination. 6028 // Null termination.
6027 { no_reg, no_reg, no_reg, EMIT_REMEMBERED_SET} 6029 { REG(no_reg), REG(no_reg), REG(no_reg), EMIT_REMEMBERED_SET}
6028 }; 6030 };
6029 6031
6032 #undef REG
6030 6033
6031 bool RecordWriteStub::IsPregenerated() { 6034 bool RecordWriteStub::IsPregenerated() {
6032 for (AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; 6035 for (AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime;
6033 !entry->object.is(no_reg); 6036 !entry->object.is(no_reg);
6034 entry++) { 6037 entry++) {
6035 if (object_.is(entry->object) && 6038 if (object_.is(entry->object) &&
6036 value_.is(entry->value) && 6039 value_.is(entry->value) &&
6037 address_.is(entry->address) && 6040 address_.is(entry->address) &&
6038 remembered_set_action_ == entry->action && 6041 remembered_set_action_ == entry->action &&
6039 save_fp_regs_mode_ == kDontSaveFPRegs) { 6042 save_fp_regs_mode_ == kDontSaveFPRegs) {
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
6343 xmm0, 6346 xmm0,
6344 &slow_elements); 6347 &slow_elements);
6345 __ ret(0); 6348 __ ret(0);
6346 } 6349 }
6347 6350
6348 #undef __ 6351 #undef __
6349 6352
6350 } } // namespace v8::internal 6353 } } // namespace v8::internal
6351 6354
6352 #endif // V8_TARGET_ARCH_X64 6355 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x64/disasm-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698