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

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.cc

Issue 1980463002: Fix %FunctionGetName and %_ClassOf for bound functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix %_ClassOf instead Created 4 years, 7 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 | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/x64/full-codegen-x64.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 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 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 2820 matching lines...) Expand 10 before | Expand all | Expand 10 after
2831 Label done, null, function, non_function_constructor; 2831 Label done, null, function, non_function_constructor;
2832 2832
2833 VisitForAccumulatorValue(args->at(0)); 2833 VisitForAccumulatorValue(args->at(0));
2834 2834
2835 // If the object is not a JSReceiver, we return null. 2835 // If the object is not a JSReceiver, we return null.
2836 __ JumpIfSmi(v0, &null); 2836 __ JumpIfSmi(v0, &null);
2837 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); 2837 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
2838 __ GetObjectType(v0, v0, a1); // Map is now in v0. 2838 __ GetObjectType(v0, v0, a1); // Map is now in v0.
2839 __ Branch(&null, lt, a1, Operand(FIRST_JS_RECEIVER_TYPE)); 2839 __ Branch(&null, lt, a1, Operand(FIRST_JS_RECEIVER_TYPE));
2840 2840
2841 // Return 'Function' for JSFunction objects. 2841 // Return 'Function' for JSFunction and JSBoundFunction objects.
2842 __ Branch(&function, eq, a1, Operand(JS_FUNCTION_TYPE)); 2842 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE);
2843 __ Branch(&function, hs, a1, Operand(FIRST_FUNCTION_TYPE));
2843 2844
2844 // Check if the constructor in the map is a JS function. 2845 // Check if the constructor in the map is a JS function.
2845 Register instance_type = a2; 2846 Register instance_type = a2;
2846 __ GetMapConstructor(v0, v0, a1, instance_type); 2847 __ GetMapConstructor(v0, v0, a1, instance_type);
2847 __ Branch(&non_function_constructor, ne, instance_type, 2848 __ Branch(&non_function_constructor, ne, instance_type,
2848 Operand(JS_FUNCTION_TYPE)); 2849 Operand(JS_FUNCTION_TYPE));
2849 2850
2850 // v0 now contains the constructor function. Grab the 2851 // v0 now contains the constructor function. Grab the
2851 // instance class name from there. 2852 // instance class name from there.
2852 __ ld(v0, FieldMemOperand(v0, JSFunction::kSharedFunctionInfoOffset)); 2853 __ ld(v0, FieldMemOperand(v0, JSFunction::kSharedFunctionInfoOffset));
(...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
3952 reinterpret_cast<uint64_t>( 3953 reinterpret_cast<uint64_t>(
3953 isolate->builtins()->OnStackReplacement()->entry())); 3954 isolate->builtins()->OnStackReplacement()->entry()));
3954 return ON_STACK_REPLACEMENT; 3955 return ON_STACK_REPLACEMENT;
3955 } 3956 }
3956 3957
3957 3958
3958 } // namespace internal 3959 } // namespace internal
3959 } // namespace v8 3960 } // namespace v8
3960 3961
3961 #endif // V8_TARGET_ARCH_MIPS64 3962 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698