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

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

Issue 8372028: Further improvements upon r9747. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: . Created 9 years, 1 month 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
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 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 // register. If the parameter initial_capacity is larger than zero an elements 919 // register. If the parameter initial_capacity is larger than zero an elements
920 // backing store is allocated with this size and filled with the hole values. 920 // backing store is allocated with this size and filled with the hole values.
921 // Otherwise the elements backing store is set to the empty FixedArray. 921 // Otherwise the elements backing store is set to the empty FixedArray.
922 static void AllocateEmptyJSArray(MacroAssembler* masm, 922 static void AllocateEmptyJSArray(MacroAssembler* masm,
923 Register array_function, 923 Register array_function,
924 Register result, 924 Register result,
925 Register scratch1, 925 Register scratch1,
926 Register scratch2, 926 Register scratch2,
927 Register scratch3, 927 Register scratch3,
928 Label* gc_required) { 928 Label* gc_required) {
929 int initial_capacity = JSArray::kPreallocatedArrayElements; 929 const int initial_capacity = JSArray::kPreallocatedArrayElements;
930 ASSERT(initial_capacity >= 0); 930 STATIC_ASSERT(initial_capacity >= 0);
931 // Load the initial map from the array function. 931 // Load the initial map from the array function.
932 __ mov(scratch1, FieldOperand(array_function, 932 __ mov(scratch1, FieldOperand(array_function,
933 JSFunction::kPrototypeOrInitialMapOffset)); 933 JSFunction::kPrototypeOrInitialMapOffset));
934 934
935 // Allocate the JSArray object together with space for a fixed array with the 935 // Allocate the JSArray object together with space for a fixed array with the
936 // requested elements. 936 // requested elements.
937 int size = JSArray::kSize; 937 int size = JSArray::kSize;
938 if (initial_capacity > 0) { 938 if (initial_capacity > 0) {
939 size += FixedArray::SizeFor(initial_capacity); 939 size += FixedArray::SizeFor(initial_capacity);
940 } 940 }
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
1672 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); 1672 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR);
1673 generator.Generate(); 1673 generator.Generate();
1674 } 1674 }
1675 1675
1676 1676
1677 #undef __ 1677 #undef __
1678 } 1678 }
1679 } // namespace v8::internal 1679 } // namespace v8::internal
1680 1680
1681 #endif // V8_TARGET_ARCH_IA32 1681 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/arm/builtins-arm.cc ('K') | « src/arm/builtins-arm.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698