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

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

Issue 10917260: Microoptimization to regexps. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 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/code-stubs-arm.cc ('k') | src/mips/code-stubs-mips.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 4152 matching lines...) Expand 10 before | Expand all | Expand 10 after
4163 // Fill out the elements FixedArray. 4163 // Fill out the elements FixedArray.
4164 // eax: JSArray. 4164 // eax: JSArray.
4165 // ebx: FixedArray. 4165 // ebx: FixedArray.
4166 // ecx: Number of elements in array, as smi. 4166 // ecx: Number of elements in array, as smi.
4167 4167
4168 // Set map. 4168 // Set map.
4169 __ mov(FieldOperand(ebx, HeapObject::kMapOffset), 4169 __ mov(FieldOperand(ebx, HeapObject::kMapOffset),
4170 Immediate(factory->fixed_array_map())); 4170 Immediate(factory->fixed_array_map()));
4171 // Set length. 4171 // Set length.
4172 __ mov(FieldOperand(ebx, FixedArray::kLengthOffset), ecx); 4172 __ mov(FieldOperand(ebx, FixedArray::kLengthOffset), ecx);
4173 // Fill contents of fixed-array with the-hole. 4173 // Fill contents of fixed-array with undefined.
4174 __ SmiUntag(ecx); 4174 __ SmiUntag(ecx);
4175 __ mov(edx, Immediate(factory->the_hole_value())); 4175 __ mov(edx, Immediate(factory->undefined_value()));
4176 __ lea(ebx, FieldOperand(ebx, FixedArray::kHeaderSize)); 4176 __ lea(ebx, FieldOperand(ebx, FixedArray::kHeaderSize));
4177 // Fill fixed array elements with hole. 4177 // Fill fixed array elements with undefined.
4178 // eax: JSArray. 4178 // eax: JSArray.
4179 // ecx: Number of elements to fill. 4179 // ecx: Number of elements to fill.
4180 // ebx: Start of elements in FixedArray. 4180 // ebx: Start of elements in FixedArray.
4181 // edx: the hole. 4181 // edx: undefined.
4182 Label loop; 4182 Label loop;
4183 __ test(ecx, ecx); 4183 __ test(ecx, ecx);
4184 __ bind(&loop); 4184 __ bind(&loop);
4185 __ j(less_equal, &done, Label::kNear); // Jump if ecx is negative or zero. 4185 __ j(less_equal, &done, Label::kNear); // Jump if ecx is negative or zero.
4186 __ sub(ecx, Immediate(1)); 4186 __ sub(ecx, Immediate(1));
4187 __ mov(Operand(ebx, ecx, times_pointer_size, 0), edx); 4187 __ mov(Operand(ebx, ecx, times_pointer_size, 0), edx);
4188 __ jmp(&loop); 4188 __ jmp(&loop);
4189 4189
4190 __ bind(&done); 4190 __ bind(&done);
4191 __ ret(3 * kPointerSize); 4191 __ ret(3 * kPointerSize);
(...skipping 3312 matching lines...) Expand 10 before | Expand all | Expand 10 after
7504 // Restore ecx. 7504 // Restore ecx.
7505 __ pop(ecx); 7505 __ pop(ecx);
7506 __ ret(0); 7506 __ ret(0);
7507 } 7507 }
7508 7508
7509 #undef __ 7509 #undef __
7510 7510
7511 } } // namespace v8::internal 7511 } } // namespace v8::internal
7512 7512
7513 #endif // V8_TARGET_ARCH_IA32 7513 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698