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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.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/crankshaft/x64/lithium-codegen-x64.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.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_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 2816 matching lines...) Expand 10 before | Expand all | Expand 10 after
2827 2827
2828 VisitForAccumulatorValue(args->at(0)); 2828 VisitForAccumulatorValue(args->at(0));
2829 2829
2830 // If the object is not a JSReceiver, we return null. 2830 // If the object is not a JSReceiver, we return null.
2831 __ JumpIfSmi(r0, &null); 2831 __ JumpIfSmi(r0, &null);
2832 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); 2832 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
2833 __ CompareObjectType(r0, r0, r1, FIRST_JS_RECEIVER_TYPE); 2833 __ CompareObjectType(r0, r0, r1, FIRST_JS_RECEIVER_TYPE);
2834 // Map is now in r0. 2834 // Map is now in r0.
2835 __ b(lt, &null); 2835 __ b(lt, &null);
2836 2836
2837 // Return 'Function' for JSFunction objects. 2837 // Return 'Function' for JSFunction and JSBoundFunction objects.
2838 __ cmp(r1, Operand(JS_FUNCTION_TYPE)); 2838 __ cmp(r1, Operand(FIRST_FUNCTION_TYPE));
2839 __ b(eq, &function); 2839 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE);
2840 __ b(hs, &function);
2840 2841
2841 // Check if the constructor in the map is a JS function. 2842 // Check if the constructor in the map is a JS function.
2842 Register instance_type = r2; 2843 Register instance_type = r2;
2843 __ GetMapConstructor(r0, r0, r1, instance_type); 2844 __ GetMapConstructor(r0, r0, r1, instance_type);
2844 __ cmp(instance_type, Operand(JS_FUNCTION_TYPE)); 2845 __ cmp(instance_type, Operand(JS_FUNCTION_TYPE));
2845 __ b(ne, &non_function_constructor); 2846 __ b(ne, &non_function_constructor);
2846 2847
2847 // r0 now contains the constructor function. Grab the 2848 // r0 now contains the constructor function. Grab the
2848 // instance class name from there. 2849 // instance class name from there.
2849 __ ldr(r0, FieldMemOperand(r0, JSFunction::kSharedFunctionInfoOffset)); 2850 __ ldr(r0, FieldMemOperand(r0, JSFunction::kSharedFunctionInfoOffset));
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
3990 DCHECK(interrupt_address == 3991 DCHECK(interrupt_address ==
3991 isolate->builtins()->OnStackReplacement()->entry()); 3992 isolate->builtins()->OnStackReplacement()->entry());
3992 return ON_STACK_REPLACEMENT; 3993 return ON_STACK_REPLACEMENT;
3993 } 3994 }
3994 3995
3995 3996
3996 } // namespace internal 3997 } // namespace internal
3997 } // namespace v8 3998 } // namespace v8
3998 3999
3999 #endif // V8_TARGET_ARCH_ARM 4000 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698