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

Side by Side Diff: src/arm/ic-arm.cc

Issue 7113012: Call a stub for the write barrier on ARM. This is a step (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 6 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/arm/full-codegen-arm.cc ('k') | src/arm/lithium-codegen-arm.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 __ tst(scratch1, Operand(kTypeAndReadOnlyMask)); 202 __ tst(scratch1, Operand(kTypeAndReadOnlyMask));
203 __ b(ne, miss); 203 __ b(ne, miss);
204 204
205 // Store the value at the masked, scaled index and return. 205 // Store the value at the masked, scaled index and return.
206 const int kValueOffset = kElementsStartOffset + kPointerSize; 206 const int kValueOffset = kElementsStartOffset + kPointerSize;
207 __ add(scratch2, scratch2, Operand(kValueOffset - kHeapObjectTag)); 207 __ add(scratch2, scratch2, Operand(kValueOffset - kHeapObjectTag));
208 __ str(value, MemOperand(scratch2)); 208 __ str(value, MemOperand(scratch2));
209 209
210 // Update the write barrier. Make sure not to clobber the value. 210 // Update the write barrier. Make sure not to clobber the value.
211 __ mov(scratch1, value); 211 __ mov(scratch1, value);
212 __ RecordWrite(elements, scratch2, scratch1, kDontSaveFPRegs); 212 __ RecordWrite(
213 elements, scratch2, scratch1, kLRHasNotBeenSaved, kDontSaveFPRegs);
213 } 214 }
214 215
215 216
216 static void GenerateNumberDictionaryLoad(MacroAssembler* masm, 217 static void GenerateNumberDictionaryLoad(MacroAssembler* masm,
217 Label* miss, 218 Label* miss,
218 Register elements, 219 Register elements,
219 Register key, 220 Register key,
220 Register result, 221 Register result,
221 Register t0, 222 Register t0,
222 Register t1, 223 Register t1,
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1295 __ str(value, MemOperand(address)); 1296 __ str(value, MemOperand(address));
1296 // Skip write barrier if the written value is a smi. 1297 // Skip write barrier if the written value is a smi.
1297 __ tst(value, Operand(kSmiTagMask)); 1298 __ tst(value, Operand(kSmiTagMask));
1298 __ Ret(eq); 1299 __ Ret(eq);
1299 1300
1300 // Update write barrier for the elements array address. 1301 // Update write barrier for the elements array address.
1301 __ mov(scratch_value, value); // Preserve the value which is returned. 1302 __ mov(scratch_value, value); // Preserve the value which is returned.
1302 __ RecordWrite(elements, 1303 __ RecordWrite(elements,
1303 address, 1304 address,
1304 scratch_value, 1305 scratch_value,
1306 kLRHasNotBeenSaved,
1305 kDontSaveFPRegs, 1307 kDontSaveFPRegs,
1306 EMIT_REMEMBERED_SET, 1308 EMIT_REMEMBERED_SET,
1307 OMIT_SMI_CHECK); 1309 OMIT_SMI_CHECK);
1308 1310
1309 __ Ret(); 1311 __ Ret();
1310 } 1312 }
1311 1313
1312 1314
1313 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, 1315 void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
1314 StrictModeFlag strict_mode) { 1316 StrictModeFlag strict_mode) {
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
1561 Register reg = Assembler::GetRn(instr_at_patch); 1563 Register reg = Assembler::GetRn(instr_at_patch);
1562 patcher.masm()->tst(reg, Operand(kSmiTagMask)); 1564 patcher.masm()->tst(reg, Operand(kSmiTagMask));
1563 patcher.EmitCondition(eq); 1565 patcher.EmitCondition(eq);
1564 } 1566 }
1565 } 1567 }
1566 1568
1567 1569
1568 } } // namespace v8::internal 1570 } } // namespace v8::internal
1569 1571
1570 #endif // V8_TARGET_ARCH_ARM 1572 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698