OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // | 2 // |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 | 5 |
6 #include "src/crankshaft/s390/lithium-codegen-s390.h" | 6 #include "src/crankshaft/s390/lithium-codegen-s390.h" |
7 | 7 |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 2464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2475 // the temp registers, but not the input. | 2475 // the temp registers, but not the input. |
2476 void LCodeGen::EmitClassOfTest(Label* is_true, Label* is_false, | 2476 void LCodeGen::EmitClassOfTest(Label* is_true, Label* is_false, |
2477 Handle<String> class_name, Register input, | 2477 Handle<String> class_name, Register input, |
2478 Register temp, Register temp2) { | 2478 Register temp, Register temp2) { |
2479 DCHECK(!input.is(temp)); | 2479 DCHECK(!input.is(temp)); |
2480 DCHECK(!input.is(temp2)); | 2480 DCHECK(!input.is(temp2)); |
2481 DCHECK(!temp.is(temp2)); | 2481 DCHECK(!temp.is(temp2)); |
2482 | 2482 |
2483 __ JumpIfSmi(input, is_false); | 2483 __ JumpIfSmi(input, is_false); |
2484 | 2484 |
2485 __ CompareObjectType(input, temp, temp2, JS_FUNCTION_TYPE); | 2485 __ CompareObjectType(input, temp, temp2, FIRST_FUNCTION_TYPE); |
| 2486 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE); |
2486 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { | 2487 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { |
2487 __ beq(is_true); | 2488 __ bge(is_true); |
2488 } else { | 2489 } else { |
2489 __ beq(is_false); | 2490 __ bge(is_false); |
2490 } | 2491 } |
2491 | 2492 |
2492 // Check if the constructor in the map is a function. | 2493 // Check if the constructor in the map is a function. |
2493 Register instance_type = ip; | 2494 Register instance_type = ip; |
2494 __ GetMapConstructor(temp, temp, temp2, instance_type); | 2495 __ GetMapConstructor(temp, temp, temp2, instance_type); |
2495 | 2496 |
2496 // Objects with a non-function constructor have class 'Object'. | 2497 // Objects with a non-function constructor have class 'Object'. |
2497 __ CmpP(instance_type, Operand(JS_FUNCTION_TYPE)); | 2498 __ CmpP(instance_type, Operand(JS_FUNCTION_TYPE)); |
2498 if (String::Equals(isolate()->factory()->Object_string(), class_name)) { | 2499 if (String::Equals(isolate()->factory()->Object_string(), class_name)) { |
2499 __ bne(is_true); | 2500 __ bne(is_true); |
(...skipping 3212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5712 __ LoadP(result, | 5713 __ LoadP(result, |
5713 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5714 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
5714 __ bind(deferred->exit()); | 5715 __ bind(deferred->exit()); |
5715 __ bind(&done); | 5716 __ bind(&done); |
5716 } | 5717 } |
5717 | 5718 |
5718 #undef __ | 5719 #undef __ |
5719 | 5720 |
5720 } // namespace internal | 5721 } // namespace internal |
5721 } // namespace v8 | 5722 } // namespace v8 |
OLD | NEW |