OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_S390 | 5 #if V8_TARGET_ARCH_S390 |
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 2906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2917 | 2917 |
2918 VisitForAccumulatorValue(args->at(0)); | 2918 VisitForAccumulatorValue(args->at(0)); |
2919 | 2919 |
2920 // If the object is not a JSReceiver, we return null. | 2920 // If the object is not a JSReceiver, we return null. |
2921 __ JumpIfSmi(r2, &null); | 2921 __ JumpIfSmi(r2, &null); |
2922 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); | 2922 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); |
2923 __ CompareObjectType(r2, r2, r3, FIRST_JS_RECEIVER_TYPE); | 2923 __ CompareObjectType(r2, r2, r3, FIRST_JS_RECEIVER_TYPE); |
2924 // Map is now in r2. | 2924 // Map is now in r2. |
2925 __ blt(&null); | 2925 __ blt(&null); |
2926 | 2926 |
2927 // Return 'Function' for JSFunction objects. | 2927 // Return 'Function' for JSFunction and JSBoundFunction objects. |
2928 __ CmpP(r3, Operand(JS_FUNCTION_TYPE)); | 2928 __ CmpLogicalP(r3, Operand(FIRST_FUNCTION_TYPE)); |
2929 __ beq(&function); | 2929 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE); |
| 2930 __ bge(&function); |
2930 | 2931 |
2931 // Check if the constructor in the map is a JS function. | 2932 // Check if the constructor in the map is a JS function. |
2932 Register instance_type = r4; | 2933 Register instance_type = r4; |
2933 __ GetMapConstructor(r2, r2, r3, instance_type); | 2934 __ GetMapConstructor(r2, r2, r3, instance_type); |
2934 __ CmpP(instance_type, Operand(JS_FUNCTION_TYPE)); | 2935 __ CmpP(instance_type, Operand(JS_FUNCTION_TYPE)); |
2935 __ bne(&non_function_constructor, Label::kNear); | 2936 __ bne(&non_function_constructor, Label::kNear); |
2936 | 2937 |
2937 // r2 now contains the constructor function. Grab the | 2938 // r2 now contains the constructor function. Grab the |
2938 // instance class name from there. | 2939 // instance class name from there. |
2939 __ LoadP(r2, FieldMemOperand(r2, JSFunction::kSharedFunctionInfoOffset)); | 2940 __ LoadP(r2, FieldMemOperand(r2, JSFunction::kSharedFunctionInfoOffset)); |
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3971 DCHECK(kOSRBranchInstruction == br_instr); | 3972 DCHECK(kOSRBranchInstruction == br_instr); |
3972 | 3973 |
3973 DCHECK(interrupt_address == | 3974 DCHECK(interrupt_address == |
3974 isolate->builtins()->OnStackReplacement()->entry()); | 3975 isolate->builtins()->OnStackReplacement()->entry()); |
3975 return ON_STACK_REPLACEMENT; | 3976 return ON_STACK_REPLACEMENT; |
3976 } | 3977 } |
3977 | 3978 |
3978 } // namespace internal | 3979 } // namespace internal |
3979 } // namespace v8 | 3980 } // namespace v8 |
3980 #endif // V8_TARGET_ARCH_S390 | 3981 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |