Index: src/ia32/code-stubs-ia32.cc |
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc |
index 2d078cdc06adc17bb8f451b27d0ae6bf140624f2..09749c902edf94c00adccc96dfeb9e7672ff4413 100644 |
--- a/src/ia32/code-stubs-ia32.cc |
+++ b/src/ia32/code-stubs-ia32.cc |
@@ -7027,44 +7027,47 @@ struct AheadOfTimeWriteBarrierStubList { |
}; |
-struct AheadOfTimeWriteBarrierStubList kAheadOfTime[] = { |
+#define REG(Name) { kRegister ## Name ## Code } |
+ |
+static const AheadOfTimeWriteBarrierStubList kAheadOfTime[] = { |
// Used in RegExpExecStub. |
- { ebx, eax, edi, EMIT_REMEMBERED_SET }, |
+ { REG(Ebx), REG(Eax), REG(Edi), EMIT_REMEMBERED_SET }, |
// Used in CompileArrayPushCall. |
- { ebx, ecx, edx, EMIT_REMEMBERED_SET }, |
- { ebx, edi, edx, OMIT_REMEMBERED_SET }, |
+ { REG(Ebx), REG(Ecx), REG(Edx), EMIT_REMEMBERED_SET }, |
+ { REG(Ebx), REG(Edi), REG(Edx), OMIT_REMEMBERED_SET }, |
// Used in CompileStoreGlobal and CallFunctionStub. |
- { ebx, ecx, edx, OMIT_REMEMBERED_SET }, |
+ { REG(Ebx), REG(Ecx), REG(Edx), OMIT_REMEMBERED_SET }, |
// Used in StoreStubCompiler::CompileStoreField and |
// KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField. |
- { edx, ecx, ebx, EMIT_REMEMBERED_SET }, |
+ { REG(Edx), REG(Ecx), REG(Ebx), EMIT_REMEMBERED_SET }, |
// GenerateStoreField calls the stub with two different permutations of |
// registers. This is the second. |
- { ebx, ecx, edx, EMIT_REMEMBERED_SET }, |
+ { REG(Ebx), REG(Ecx), REG(Edx), EMIT_REMEMBERED_SET }, |
// StoreIC::GenerateNormal via GenerateDictionaryStore |
- { ebx, edi, edx, EMIT_REMEMBERED_SET }, |
+ { REG(Ebx), REG(Edi), REG(Edx), EMIT_REMEMBERED_SET }, |
// KeyedStoreIC::GenerateGeneric. |
- { ebx, edx, ecx, EMIT_REMEMBERED_SET}, |
+ { REG(Ebx), REG(Edx), REG(Ecx), EMIT_REMEMBERED_SET}, |
// KeyedStoreStubCompiler::GenerateStoreFastElement. |
- { edi, ebx, ecx, EMIT_REMEMBERED_SET}, |
- { edx, edi, ebx, EMIT_REMEMBERED_SET}, |
+ { REG(Edi), REG(Ebx), REG(Ecx), EMIT_REMEMBERED_SET}, |
+ { REG(Edx), REG(Edi), REG(Ebx), EMIT_REMEMBERED_SET}, |
// ElementsTransitionGenerator::GenerateSmiOnlyToObject |
// and ElementsTransitionGenerator::GenerateSmiOnlyToDouble |
// and ElementsTransitionGenerator::GenerateDoubleToObject |
- { edx, ebx, edi, EMIT_REMEMBERED_SET}, |
- { edx, ebx, edi, OMIT_REMEMBERED_SET}, |
+ { REG(Edx), REG(Ebx), REG(Edi), EMIT_REMEMBERED_SET}, |
+ { REG(Edx), REG(Ebx), REG(Edi), OMIT_REMEMBERED_SET}, |
// ElementsTransitionGenerator::GenerateDoubleToObject |
- { eax, edx, esi, EMIT_REMEMBERED_SET}, |
- { edx, eax, edi, EMIT_REMEMBERED_SET}, |
+ { REG(Eax), REG(Edx), REG(Esi), EMIT_REMEMBERED_SET}, |
+ { REG(Edx), REG(Eax), REG(Edi), EMIT_REMEMBERED_SET}, |
// StoreArrayLiteralElementStub::Generate |
- { ebx, eax, ecx, EMIT_REMEMBERED_SET}, |
+ { REG(Ebx), REG(Eax), REG(Ecx), EMIT_REMEMBERED_SET}, |
// Null termination. |
- { no_reg, no_reg, no_reg, EMIT_REMEMBERED_SET} |
+ { REG(None), REG(None), REG(None), EMIT_REMEMBERED_SET} |
}; |
+#undef REG |
bool RecordWriteStub::IsPregenerated() { |
- for (AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; |
+ for (const AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; |
!entry->object.is(no_reg); |
entry++) { |
if (object_.is(entry->object) && |
@@ -7092,7 +7095,7 @@ void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime() { |
void RecordWriteStub::GenerateFixedRegStubsAheadOfTime() { |
- for (AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; |
+ for (const AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; |
!entry->object.is(no_reg); |
entry++) { |
RecordWriteStub stub(entry->object, |