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

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

Issue 11938013: Migrate ArrayLength (Keyed|Named)LoadIC to CodeStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 11 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/ia32/code-stubs-ia32.cc ('k') | src/ia32/stub-cache-ia32.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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 const int kValueOffset = kElementsStartOffset + kPointerSize; 209 const int kValueOffset = kElementsStartOffset + kPointerSize;
210 __ lea(r0, Operand(elements, r0, times_4, kValueOffset - kHeapObjectTag)); 210 __ lea(r0, Operand(elements, r0, times_4, kValueOffset - kHeapObjectTag));
211 __ mov(Operand(r0, 0), value); 211 __ mov(Operand(r0, 0), value);
212 212
213 // Update write barrier. Make sure not to clobber the value. 213 // Update write barrier. Make sure not to clobber the value.
214 __ mov(r1, value); 214 __ mov(r1, value);
215 __ RecordWrite(elements, r0, r1, kDontSaveFPRegs); 215 __ RecordWrite(elements, r0, r1, kDontSaveFPRegs);
216 } 216 }
217 217
218 218
219 void LoadIC::GenerateArrayLength(MacroAssembler* masm) {
220 // ----------- S t a t e -------------
221 // -- ecx : name
222 // -- edx : receiver
223 // -- esp[0] : return address
224 // -----------------------------------
225 Label miss;
226
227 StubCompiler::GenerateLoadArrayLength(masm, edx, eax, &miss);
228 __ bind(&miss);
229 StubCompiler::GenerateLoadMiss(masm, Code::LOAD_IC);
230 }
231
232
233 void LoadIC::GenerateFunctionPrototype(MacroAssembler* masm) { 219 void LoadIC::GenerateFunctionPrototype(MacroAssembler* masm) {
234 // ----------- S t a t e ------------- 220 // ----------- S t a t e -------------
235 // -- ecx : name 221 // -- ecx : name
236 // -- edx : receiver 222 // -- edx : receiver
237 // -- esp[0] : return address 223 // -- esp[0] : return address
238 // ----------------------------------- 224 // -----------------------------------
239 Label miss; 225 Label miss;
240 226
241 StubCompiler::GenerateLoadFunctionPrototype(masm, edx, eax, ebx, &miss); 227 StubCompiler::GenerateLoadFunctionPrototype(masm, edx, eax, ebx, &miss);
242 __ bind(&miss); 228 __ bind(&miss);
(...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after
1752 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) 1738 Condition cc = (check == ENABLE_INLINED_SMI_CHECK)
1753 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 1739 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
1754 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 1740 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
1755 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1741 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1756 } 1742 }
1757 1743
1758 1744
1759 } } // namespace v8::internal 1745 } } // namespace v8::internal
1760 1746
1761 #endif // V8_TARGET_ARCH_IA32 1747 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698