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

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

Issue 7945009: Merge experimental/gc branch to the bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 3 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-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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 __ tst(scratch1, Operand(kTypeAndReadOnlyMask)); 201 __ tst(scratch1, Operand(kTypeAndReadOnlyMask));
202 __ b(ne, miss); 202 __ b(ne, miss);
203 203
204 // Store the value at the masked, scaled index and return. 204 // Store the value at the masked, scaled index and return.
205 const int kValueOffset = kElementsStartOffset + kPointerSize; 205 const int kValueOffset = kElementsStartOffset + kPointerSize;
206 __ add(scratch2, scratch2, Operand(kValueOffset - kHeapObjectTag)); 206 __ add(scratch2, scratch2, Operand(kValueOffset - kHeapObjectTag));
207 __ str(value, MemOperand(scratch2)); 207 __ str(value, MemOperand(scratch2));
208 208
209 // Update the write barrier. Make sure not to clobber the value. 209 // Update the write barrier. Make sure not to clobber the value.
210 __ mov(scratch1, value); 210 __ mov(scratch1, value);
211 __ RecordWrite(elements, scratch2, scratch1); 211 __ RecordWrite(
212 elements, scratch2, scratch1, kLRHasNotBeenSaved, kDontSaveFPRegs);
212 } 213 }
213 214
214 215
215 void LoadIC::GenerateArrayLength(MacroAssembler* masm) { 216 void LoadIC::GenerateArrayLength(MacroAssembler* masm) {
216 // ----------- S t a t e ------------- 217 // ----------- S t a t e -------------
217 // -- r2 : name 218 // -- r2 : name
218 // -- lr : return address 219 // -- lr : return address
219 // -- r0 : receiver 220 // -- r0 : receiver
220 // -- sp[0] : receiver 221 // -- sp[0] : receiver
221 // ----------------------------------- 222 // -----------------------------------
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 // -- r0 : value 904 // -- r0 : value
904 // -- r1 : key 905 // -- r1 : key
905 // -- r2 : receiver 906 // -- r2 : receiver
906 // -- lr : return address 907 // -- lr : return address
907 // ----------------------------------- 908 // -----------------------------------
908 Label slow, notin; 909 Label slow, notin;
909 MemOperand mapped_location = 910 MemOperand mapped_location =
910 GenerateMappedArgumentsLookup(masm, r2, r1, r3, r4, r5, &notin, &slow); 911 GenerateMappedArgumentsLookup(masm, r2, r1, r3, r4, r5, &notin, &slow);
911 __ str(r0, mapped_location); 912 __ str(r0, mapped_location);
912 __ add(r6, r3, r5); 913 __ add(r6, r3, r5);
913 __ RecordWrite(r3, r6, r9); 914 __ mov(r9, r0);
915 __ RecordWrite(r3, r6, r9, kLRHasNotBeenSaved, kDontSaveFPRegs);
914 __ Ret(); 916 __ Ret();
915 __ bind(&notin); 917 __ bind(&notin);
916 // The unmapped lookup expects that the parameter map is in r3. 918 // The unmapped lookup expects that the parameter map is in r3.
917 MemOperand unmapped_location = 919 MemOperand unmapped_location =
918 GenerateUnmappedArgumentsLookup(masm, r1, r3, r4, &slow); 920 GenerateUnmappedArgumentsLookup(masm, r1, r3, r4, &slow);
919 __ str(r0, unmapped_location); 921 __ str(r0, unmapped_location);
920 __ add(r6, r3, r4); 922 __ add(r6, r3, r4);
921 __ RecordWrite(r3, r6, r9); 923 __ mov(r9, r0);
924 __ RecordWrite(r3, r6, r9, kLRHasNotBeenSaved, kDontSaveFPRegs);
922 __ Ret(); 925 __ Ret();
923 __ bind(&slow); 926 __ bind(&slow);
924 GenerateMiss(masm, false); 927 GenerateMiss(masm, false);
925 } 928 }
926 929
927 930
928 void KeyedCallIC::GenerateNonStrictArguments(MacroAssembler* masm, 931 void KeyedCallIC::GenerateNonStrictArguments(MacroAssembler* masm,
929 int argc) { 932 int argc) {
930 // ----------- S t a t e ------------- 933 // ----------- S t a t e -------------
931 // -- r2 : name 934 // -- r2 : name
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1348 __ cmp(r4, ip); 1351 __ cmp(r4, ip);
1349 __ b(ne, &slow); 1352 __ b(ne, &slow);
1350 1353
1351 // Check the key against the length in the array. 1354 // Check the key against the length in the array.
1352 __ ldr(ip, FieldMemOperand(receiver, JSArray::kLengthOffset)); 1355 __ ldr(ip, FieldMemOperand(receiver, JSArray::kLengthOffset));
1353 __ cmp(key, Operand(ip)); 1356 __ cmp(key, Operand(ip));
1354 __ b(hs, &extra); 1357 __ b(hs, &extra);
1355 // Fall through to fast case. 1358 // Fall through to fast case.
1356 1359
1357 __ bind(&fast); 1360 __ bind(&fast);
1361 Register scratch_value = r4;
1362 Register address = r5;
1358 // Fast case, store the value to the elements backing store. 1363 // Fast case, store the value to the elements backing store.
1359 __ add(r5, elements, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); 1364 __ add(address, elements, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
1360 __ add(r5, r5, Operand(key, LSL, kPointerSizeLog2 - kSmiTagSize)); 1365 __ add(address, address, Operand(key, LSL, kPointerSizeLog2 - kSmiTagSize));
1361 __ str(value, MemOperand(r5)); 1366 __ str(value, MemOperand(address));
1362 // Skip write barrier if the written value is a smi. 1367 // Skip write barrier if the written value is a smi.
1363 __ tst(value, Operand(kSmiTagMask)); 1368 __ tst(value, Operand(kSmiTagMask));
1364 __ Ret(eq); 1369 __ Ret(eq);
1370
1365 // Update write barrier for the elements array address. 1371 // Update write barrier for the elements array address.
1366 __ sub(r4, r5, Operand(elements)); 1372 __ mov(scratch_value, value); // Preserve the value which is returned.
1367 __ RecordWrite(elements, Operand(r4), r5, r6); 1373 __ RecordWrite(elements,
1374 address,
1375 scratch_value,
1376 kLRHasNotBeenSaved,
1377 kDontSaveFPRegs,
1378 EMIT_REMEMBERED_SET,
1379 OMIT_SMI_CHECK);
1368 1380
1369 __ Ret(); 1381 __ Ret();
1370 } 1382 }
1371 1383
1372 1384
1373 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, 1385 void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
1374 StrictModeFlag strict_mode) { 1386 StrictModeFlag strict_mode) {
1375 // ----------- S t a t e ------------- 1387 // ----------- S t a t e -------------
1376 // -- r0 : value 1388 // -- r0 : value
1377 // -- r1 : receiver 1389 // -- r1 : receiver
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1619 Register reg = Assembler::GetRn(instr_at_patch); 1631 Register reg = Assembler::GetRn(instr_at_patch);
1620 patcher.masm()->tst(reg, Operand(kSmiTagMask)); 1632 patcher.masm()->tst(reg, Operand(kSmiTagMask));
1621 patcher.EmitCondition(eq); 1633 patcher.EmitCondition(eq);
1622 } 1634 }
1623 } 1635 }
1624 1636
1625 1637
1626 } } // namespace v8::internal 1638 } } // namespace v8::internal
1627 1639
1628 #endif // V8_TARGET_ARCH_ARM 1640 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698