OLD | NEW |
---|---|
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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
231 } | 231 } |
232 | 232 |
233 | 233 |
234 static void GenerateFastCloneShallowArrayCommon( | 234 static void GenerateFastCloneShallowArrayCommon( |
235 MacroAssembler* masm, | 235 MacroAssembler* masm, |
236 int length, | 236 int length, |
237 FastCloneShallowArrayStub::Mode mode, | 237 FastCloneShallowArrayStub::Mode mode, |
238 Label* fail) { | 238 Label* fail) { |
239 // Stack and register layout on entry: | 239 // Stack and register layout on entry: |
240 // | 240 // |
241 // [esp + kPointerSize]: constant elements. | 241 // [esp + kPointerSize]: constant elements. |
Jakob Kummerow
2011/11/17 14:34:19
Same as for the x64 version, I don't see why the d
| |
242 // [esp + (2 * kPointerSize)]: literal index. | 242 // [esp + (2 * kPointerSize)]: literal index. |
243 // [esp + (3 * kPointerSize)]: literals array. | 243 // [esp + (3 * kPointerSize)]: literals array. |
244 // eax: literal index. | 244 // ecx: boilerplate array. |
245 // ecx: literals array. | |
246 ASSERT(mode != FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS); | 245 ASSERT(mode != FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS); |
247 | 246 |
248 // All sizes here are multiples of kPointerSize. | 247 // All sizes here are multiples of kPointerSize. |
249 int elements_size = 0; | 248 int elements_size = 0; |
250 if (length > 0) { | 249 if (length > 0) { |
251 elements_size = mode == FastCloneShallowArrayStub::CLONE_DOUBLE_ELEMENTS | 250 elements_size = mode == FastCloneShallowArrayStub::CLONE_DOUBLE_ELEMENTS |
252 ? FixedDoubleArray::SizeFor(length) | 251 ? FixedDoubleArray::SizeFor(length) |
253 : FixedArray::SizeFor(length); | 252 : FixedArray::SizeFor(length); |
254 } | 253 } |
255 int size = JSArray::kSize + elements_size; | 254 int size = JSArray::kSize + elements_size; |
(...skipping 6888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7144 false); | 7143 false); |
7145 __ pop(edx); | 7144 __ pop(edx); |
7146 __ ret(0); | 7145 __ ret(0); |
7147 } | 7146 } |
7148 | 7147 |
7149 #undef __ | 7148 #undef __ |
7150 | 7149 |
7151 } } // namespace v8::internal | 7150 } } // namespace v8::internal |
7152 | 7151 |
7153 #endif // V8_TARGET_ARCH_IA32 | 7152 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |