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

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

Issue 2006653003: [generators] Fix loading of FormalParameterCount on 64bit archs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | src/mips64/builtins-mips64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 // Dispatch on the kind of generator object. 768 // Dispatch on the kind of generator object.
769 Label old_generator; 769 Label old_generator;
770 __ Ldr(x3, FieldMemOperand(x4, JSFunction::kSharedFunctionInfoOffset)); 770 __ Ldr(x3, FieldMemOperand(x4, JSFunction::kSharedFunctionInfoOffset));
771 __ Ldr(x3, FieldMemOperand(x3, SharedFunctionInfo::kFunctionDataOffset)); 771 __ Ldr(x3, FieldMemOperand(x3, SharedFunctionInfo::kFunctionDataOffset));
772 __ CompareObjectType(x3, x3, x3, BYTECODE_ARRAY_TYPE); 772 __ CompareObjectType(x3, x3, x3, BYTECODE_ARRAY_TYPE);
773 __ B(ne, &old_generator); 773 __ B(ne, &old_generator);
774 774
775 // New-style (ignition/turbofan) generator object 775 // New-style (ignition/turbofan) generator object
776 { 776 {
777 __ Ldr(x0, FieldMemOperand(x4, JSFunction::kSharedFunctionInfoOffset)); 777 __ Ldr(x0, FieldMemOperand(x4, JSFunction::kSharedFunctionInfoOffset));
778 __ Ldr(x0, 778 __ Ldr(w0,
779 FieldMemOperand(x0, SharedFunctionInfo::kFormalParameterCountOffset)); 779 FieldMemOperand(x0, SharedFunctionInfo::kFormalParameterCountOffset));
780 __ SmiUntag(x0);
781 // We abuse new.target both to indicate that this is a resume call and to 780 // We abuse new.target both to indicate that this is a resume call and to
782 // pass in the generator object. In ordinary calls, new.target is always 781 // pass in the generator object. In ordinary calls, new.target is always
783 // undefined because generator functions are non-constructable. 782 // undefined because generator functions are non-constructable.
784 __ Move(x3, x1); 783 __ Move(x3, x1);
785 __ Move(x1, x4); 784 __ Move(x1, x4);
786 __ Ldr(x5, FieldMemOperand(x1, JSFunction::kCodeEntryOffset)); 785 __ Ldr(x5, FieldMemOperand(x1, JSFunction::kCodeEntryOffset));
787 __ Jump(x5); 786 __ Jump(x5);
788 } 787 }
789 788
790 // Old-style (full-codegen) generator object 789 // Old-style (full-codegen) generator object
(...skipping 2097 matching lines...) Expand 10 before | Expand all | Expand 10 after
2888 } 2887 }
2889 } 2888 }
2890 2889
2891 2890
2892 #undef __ 2891 #undef __
2893 2892
2894 } // namespace internal 2893 } // namespace internal
2895 } // namespace v8 2894 } // namespace v8
2896 2895
2897 #endif // V8_TARGET_ARCH_ARM 2896 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698