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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 __ bind(&gc); | 229 __ bind(&gc); |
230 __ TailCallRuntime(Runtime::kPushBlockContext, 2, 1); | 230 __ TailCallRuntime(Runtime::kPushBlockContext, 2, 1); |
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 // Registers on entry: |
240 // | 240 // |
241 // [esp + kPointerSize]: constant elements. | 241 // ecx: boilerplate literal array. |
242 // [esp + (2 * kPointerSize)]: literal index. | |
243 // [esp + (3 * kPointerSize)]: literals array. | |
244 // eax: literal index. | |
245 // ecx: literals array. | |
246 ASSERT(mode != FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS); | 242 ASSERT(mode != FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS); |
247 | 243 |
248 // All sizes here are multiples of kPointerSize. | 244 // All sizes here are multiples of kPointerSize. |
249 int elements_size = 0; | 245 int elements_size = 0; |
250 if (length > 0) { | 246 if (length > 0) { |
251 elements_size = mode == FastCloneShallowArrayStub::CLONE_DOUBLE_ELEMENTS | 247 elements_size = mode == FastCloneShallowArrayStub::CLONE_DOUBLE_ELEMENTS |
252 ? FixedDoubleArray::SizeFor(length) | 248 ? FixedDoubleArray::SizeFor(length) |
253 : FixedArray::SizeFor(length); | 249 : FixedArray::SizeFor(length); |
254 } | 250 } |
255 int size = JSArray::kSize + elements_size; | 251 int size = JSArray::kSize + elements_size; |
(...skipping 6888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7144 false); | 7140 false); |
7145 __ pop(edx); | 7141 __ pop(edx); |
7146 __ ret(0); | 7142 __ ret(0); |
7147 } | 7143 } |
7148 | 7144 |
7149 #undef __ | 7145 #undef __ |
7150 | 7146 |
7151 } } // namespace v8::internal | 7147 } } // namespace v8::internal |
7152 | 7148 |
7153 #endif // V8_TARGET_ARCH_IA32 | 7149 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |