| 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 6 | 6 |
| 7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
| 9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
| 10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
| (...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 __ ld(a3, FieldMemOperand(a4, JSFunction::kSharedFunctionInfoOffset)); | 756 __ ld(a3, FieldMemOperand(a4, JSFunction::kSharedFunctionInfoOffset)); |
| 757 __ ld(a3, FieldMemOperand(a3, SharedFunctionInfo::kFunctionDataOffset)); | 757 __ ld(a3, FieldMemOperand(a3, SharedFunctionInfo::kFunctionDataOffset)); |
| 758 __ GetObjectType(a3, a3, a3); | 758 __ GetObjectType(a3, a3, a3); |
| 759 __ Branch(&old_generator, ne, a3, Operand(BYTECODE_ARRAY_TYPE)); | 759 __ Branch(&old_generator, ne, a3, Operand(BYTECODE_ARRAY_TYPE)); |
| 760 | 760 |
| 761 // New-style (ignition/turbofan) generator object. | 761 // New-style (ignition/turbofan) generator object. |
| 762 { | 762 { |
| 763 __ ld(a0, FieldMemOperand(a4, JSFunction::kSharedFunctionInfoOffset)); | 763 __ ld(a0, FieldMemOperand(a4, JSFunction::kSharedFunctionInfoOffset)); |
| 764 __ lw(a0, | 764 __ lw(a0, |
| 765 FieldMemOperand(a0, SharedFunctionInfo::kFormalParameterCountOffset)); | 765 FieldMemOperand(a0, SharedFunctionInfo::kFormalParameterCountOffset)); |
| 766 __ SmiUntag(a0); | |
| 767 // We abuse new.target both to indicate that this is a resume call and to | 766 // We abuse new.target both to indicate that this is a resume call and to |
| 768 // pass in the generator object. In ordinary calls, new.target is always | 767 // pass in the generator object. In ordinary calls, new.target is always |
| 769 // undefined because generator functions are non-constructable. | 768 // undefined because generator functions are non-constructable. |
| 770 __ Move(a3, a1); | 769 __ Move(a3, a1); |
| 771 __ Move(a1, a4); | 770 __ Move(a1, a4); |
| 772 __ ld(a2, FieldMemOperand(a1, JSFunction::kCodeEntryOffset)); | 771 __ ld(a2, FieldMemOperand(a1, JSFunction::kCodeEntryOffset)); |
| 773 __ Jump(a2); | 772 __ Jump(a2); |
| 774 } | 773 } |
| 775 | 774 |
| 776 // Old-style (full-codegen) generator object | 775 // Old-style (full-codegen) generator object |
| (...skipping 2073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2850 } | 2849 } |
| 2851 } | 2850 } |
| 2852 | 2851 |
| 2853 | 2852 |
| 2854 #undef __ | 2853 #undef __ |
| 2855 | 2854 |
| 2856 } // namespace internal | 2855 } // namespace internal |
| 2857 } // namespace v8 | 2856 } // namespace v8 |
| 2858 | 2857 |
| 2859 #endif // V8_TARGET_ARCH_MIPS64 | 2858 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |