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

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

Issue 1986343002: PPC/S390: Fix %FunctionGetName and %_ClassOf for bound functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/s390/lithium-codegen-s390.cc ('k') | src/full-codegen/s390/full-codegen-s390.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 2811 matching lines...) Expand 10 before | Expand all | Expand 10 after
2822 2822
2823 VisitForAccumulatorValue(args->at(0)); 2823 VisitForAccumulatorValue(args->at(0));
2824 2824
2825 // If the object is not a JSReceiver, we return null. 2825 // If the object is not a JSReceiver, we return null.
2826 __ JumpIfSmi(r3, &null); 2826 __ JumpIfSmi(r3, &null);
2827 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); 2827 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
2828 __ CompareObjectType(r3, r3, r4, FIRST_JS_RECEIVER_TYPE); 2828 __ CompareObjectType(r3, r3, r4, FIRST_JS_RECEIVER_TYPE);
2829 // Map is now in r3. 2829 // Map is now in r3.
2830 __ blt(&null); 2830 __ blt(&null);
2831 2831
2832 // Return 'Function' for JSFunction objects. 2832 // Return 'Function' for JSFunction and JSBoundFunction objects.
2833 __ cmpi(r4, Operand(JS_FUNCTION_TYPE)); 2833 __ cmpli(r4, Operand(FIRST_FUNCTION_TYPE));
2834 __ beq(&function); 2834 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE);
2835 __ bge(&function);
2835 2836
2836 // Check if the constructor in the map is a JS function. 2837 // Check if the constructor in the map is a JS function.
2837 Register instance_type = r5; 2838 Register instance_type = r5;
2838 __ GetMapConstructor(r3, r3, r4, instance_type); 2839 __ GetMapConstructor(r3, r3, r4, instance_type);
2839 __ cmpi(instance_type, Operand(JS_FUNCTION_TYPE)); 2840 __ cmpi(instance_type, Operand(JS_FUNCTION_TYPE));
2840 __ bne(&non_function_constructor); 2841 __ bne(&non_function_constructor);
2841 2842
2842 // r3 now contains the constructor function. Grab the 2843 // r3 now contains the constructor function. Grab the
2843 // instance class name from there. 2844 // instance class name from there.
2844 __ LoadP(r3, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset)); 2845 __ LoadP(r3, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset));
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
3900 3901
3901 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); 3902 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address)));
3902 3903
3903 DCHECK(interrupt_address == 3904 DCHECK(interrupt_address ==
3904 isolate->builtins()->OnStackReplacement()->entry()); 3905 isolate->builtins()->OnStackReplacement()->entry());
3905 return ON_STACK_REPLACEMENT; 3906 return ON_STACK_REPLACEMENT;
3906 } 3907 }
3907 } // namespace internal 3908 } // namespace internal
3908 } // namespace v8 3909 } // namespace v8
3909 #endif // V8_TARGET_ARCH_PPC 3910 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/crankshaft/s390/lithium-codegen-s390.cc ('k') | src/full-codegen/s390/full-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698