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

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

Issue 9235007: Handle single element array growth + transition in generic KeyedStoreIC (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: final version Created 8 years, 10 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 | « no previous file | src/arm/ic-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 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // and filled with the hole values. 107 // and filled with the hole values.
108 static void AllocateEmptyJSArray(MacroAssembler* masm, 108 static void AllocateEmptyJSArray(MacroAssembler* masm,
109 Register array_function, 109 Register array_function,
110 Register result, 110 Register result,
111 Register scratch1, 111 Register scratch1,
112 Register scratch2, 112 Register scratch2,
113 Register scratch3, 113 Register scratch3,
114 Label* gc_required) { 114 Label* gc_required) {
115 const int initial_capacity = JSArray::kPreallocatedArrayElements; 115 const int initial_capacity = JSArray::kPreallocatedArrayElements;
116 STATIC_ASSERT(initial_capacity >= 0); 116 STATIC_ASSERT(initial_capacity >= 0);
117 __ LoadGlobalInitialConstructedArrayMap(array_function, scratch2, scratch1); 117 __ LoadInitialArrayMap(array_function, scratch2, scratch1);
118 118
119 // Allocate the JSArray object together with space for a fixed array with the 119 // Allocate the JSArray object together with space for a fixed array with the
120 // requested elements. 120 // requested elements.
121 int size = JSArray::kSize; 121 int size = JSArray::kSize;
122 if (initial_capacity > 0) { 122 if (initial_capacity > 0) {
123 size += FixedArray::SizeFor(initial_capacity); 123 size += FixedArray::SizeFor(initial_capacity);
124 } 124 }
125 __ AllocateInNewSpace(size, 125 __ AllocateInNewSpace(size,
126 result, 126 result,
127 scratch2, 127 scratch2,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 Register array_function, // Array function. 201 Register array_function, // Array function.
202 Register array_size, // As a smi, cannot be 0. 202 Register array_size, // As a smi, cannot be 0.
203 Register result, 203 Register result,
204 Register elements_array_storage, 204 Register elements_array_storage,
205 Register elements_array_end, 205 Register elements_array_end,
206 Register scratch1, 206 Register scratch1,
207 Register scratch2, 207 Register scratch2,
208 bool fill_with_hole, 208 bool fill_with_hole,
209 Label* gc_required) { 209 Label* gc_required) {
210 // Load the initial map from the array function. 210 // Load the initial map from the array function.
211 __ LoadGlobalInitialConstructedArrayMap(array_function, scratch2, 211 __ LoadInitialArrayMap(array_function, scratch2, elements_array_storage);
212 elements_array_storage);
213 212
214 if (FLAG_debug_code) { // Assert that array size is not zero. 213 if (FLAG_debug_code) { // Assert that array size is not zero.
215 __ tst(array_size, array_size); 214 __ tst(array_size, array_size);
216 __ Assert(ne, "array size is unexpectedly 0"); 215 __ Assert(ne, "array size is unexpectedly 0");
217 } 216 }
218 217
219 // Allocate the JSArray object together with space for a FixedArray with the 218 // Allocate the JSArray object together with space for a FixedArray with the
220 // requested number of elements. 219 // requested number of elements.
221 STATIC_ASSERT(kSmiTagSize == 1 && kSmiTag == 0); 220 STATIC_ASSERT(kSmiTagSize == 1 && kSmiTag == 0);
222 __ mov(elements_array_end, 221 __ mov(elements_array_end,
(...skipping 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after
1736 __ bind(&dont_adapt_arguments); 1735 __ bind(&dont_adapt_arguments);
1737 __ Jump(r3); 1736 __ Jump(r3);
1738 } 1737 }
1739 1738
1740 1739
1741 #undef __ 1740 #undef __
1742 1741
1743 } } // namespace v8::internal 1742 } } // namespace v8::internal
1744 1743
1745 #endif // V8_TARGET_ARCH_ARM 1744 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/ic-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698