OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1901 kLRHasBeenSaved, kDontSaveFPRegs); | 1901 kLRHasBeenSaved, kDontSaveFPRegs); |
1902 | 1902 |
1903 // Load suspended function and context. | 1903 // Load suspended function and context. |
1904 __ ldr(cp, FieldMemOperand(r1, JSGeneratorObject::kContextOffset)); | 1904 __ ldr(cp, FieldMemOperand(r1, JSGeneratorObject::kContextOffset)); |
1905 __ ldr(r4, FieldMemOperand(r1, JSGeneratorObject::kFunctionOffset)); | 1905 __ ldr(r4, FieldMemOperand(r1, JSGeneratorObject::kFunctionOffset)); |
1906 | 1906 |
1907 // Load receiver and store as the first argument. | 1907 // Load receiver and store as the first argument. |
1908 __ ldr(r2, FieldMemOperand(r1, JSGeneratorObject::kReceiverOffset)); | 1908 __ ldr(r2, FieldMemOperand(r1, JSGeneratorObject::kReceiverOffset)); |
1909 __ push(r2); | 1909 __ push(r2); |
1910 | 1910 |
1911 // Push holes for the rest of the arguments to the generator function. | 1911 // Push holes for arguments to generator function. Since the parser forced |
| 1912 // context allocation for any variables in generators, the actual argument |
| 1913 // values have already been copied into the context and these dummy values |
| 1914 // will never be used. |
1912 __ ldr(r3, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset)); | 1915 __ ldr(r3, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset)); |
1913 __ ldr(r3, | 1916 __ ldr(r3, |
1914 FieldMemOperand(r3, SharedFunctionInfo::kFormalParameterCountOffset)); | 1917 FieldMemOperand(r3, SharedFunctionInfo::kFormalParameterCountOffset)); |
1915 __ LoadRoot(r2, Heap::kTheHoleValueRootIndex); | 1918 __ LoadRoot(r2, Heap::kTheHoleValueRootIndex); |
1916 Label push_argument_holes, push_frame; | 1919 Label push_argument_holes, push_frame; |
1917 __ bind(&push_argument_holes); | 1920 __ bind(&push_argument_holes); |
1918 __ sub(r3, r3, Operand(Smi::FromInt(1)), SetCC); | 1921 __ sub(r3, r3, Operand(Smi::FromInt(1)), SetCC); |
1919 __ b(mi, &push_frame); | 1922 __ b(mi, &push_frame); |
1920 __ push(r2); | 1923 __ push(r2); |
1921 __ jmp(&push_argument_holes); | 1924 __ jmp(&push_argument_holes); |
(...skipping 2247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4169 DCHECK(interrupt_address == | 4172 DCHECK(interrupt_address == |
4170 isolate->builtins()->OnStackReplacement()->entry()); | 4173 isolate->builtins()->OnStackReplacement()->entry()); |
4171 return ON_STACK_REPLACEMENT; | 4174 return ON_STACK_REPLACEMENT; |
4172 } | 4175 } |
4173 | 4176 |
4174 | 4177 |
4175 } // namespace internal | 4178 } // namespace internal |
4176 } // namespace v8 | 4179 } // namespace v8 |
4177 | 4180 |
4178 #endif // V8_TARGET_ARCH_ARM | 4181 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |