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

Unified Diff: src/ia32/builtins-ia32.cc

Issue 207010: Minor changes to the native array construct code (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/builtins-ia32.cc
===================================================================
--- src/ia32/builtins-ia32.cc (revision 2907)
+++ src/ia32/builtins-ia32.cc (working copy)
@@ -740,7 +740,10 @@
__ mov(FieldOperand(scratch1, Array::kLengthOffset), Immediate(holes));
// Fill the FixedArray with the hole value. Inline the code if short.
- if (holes <= 4) {
+ // Reconsider loop unfolding if kPreallocatedArrayElements gets changed.
+ static const int kLoopUnfoldLimit = 4
+ ASSERT(kPreallocatedArrayElements <= kLoopUnfoldLimit);
+ if (holes <= kLoopUnfoldLimit) {
// Use a scratch register here to have only one reloc info when unfolding
// the loop.
__ mov(scratch3, Factory::the_hole_value());
@@ -1068,7 +1071,7 @@
__ Assert(equal, "Unexpected initial map for Array function");
}
- // Run the native code for the Array function called as constructor.
+ // Run the native code for the Array function called as a normal function.
ArrayNativeCode(masm, false, &generic_array_code);
// Jump to the generic array code in case the specialized code cannot handle
@@ -1110,7 +1113,6 @@
// Jump to the generic construct code in case the specialized code cannot
// handle the construction.
__ bind(&generic_constructor);
- GenerateLoadArrayFunction(masm, edi);
Code* code = Builtins::builtin(Builtins::JSConstructStubGeneric);
Handle<Code> generic_construct_stub(code);
__ jmp(generic_construct_stub, RelocInfo::CODE_TARGET);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698