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 2467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2478 // the temp registers, but not the input. | 2478 // the temp registers, but not the input. |
2479 void LCodeGen::EmitClassOfTest(Label* is_true, Label* is_false, | 2479 void LCodeGen::EmitClassOfTest(Label* is_true, Label* is_false, |
2480 Handle<String> class_name, Register input, | 2480 Handle<String> class_name, Register input, |
2481 Register temp, Register temp2) { | 2481 Register temp, Register temp2) { |
2482 DCHECK(!input.is(temp)); | 2482 DCHECK(!input.is(temp)); |
2483 DCHECK(!input.is(temp2)); | 2483 DCHECK(!input.is(temp2)); |
2484 DCHECK(!temp.is(temp2)); | 2484 DCHECK(!temp.is(temp2)); |
2485 | 2485 |
2486 __ JumpIfSmi(input, is_false); | 2486 __ JumpIfSmi(input, is_false); |
2487 | 2487 |
2488 __ CompareObjectType(input, temp, temp2, JS_FUNCTION_TYPE); | 2488 __ CompareObjectType(input, temp, temp2, FIRST_FUNCTION_TYPE); |
| 2489 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE); |
2489 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { | 2490 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { |
2490 __ beq(is_true); | 2491 __ bge(is_true); |
2491 } else { | 2492 } else { |
2492 __ beq(is_false); | 2493 __ bge(is_false); |
2493 } | 2494 } |
2494 | 2495 |
2495 // Check if the constructor in the map is a function. | 2496 // Check if the constructor in the map is a function. |
2496 Register instance_type = ip; | 2497 Register instance_type = ip; |
2497 __ GetMapConstructor(temp, temp, temp2, instance_type); | 2498 __ GetMapConstructor(temp, temp, temp2, instance_type); |
2498 | 2499 |
2499 // Objects with a non-function constructor have class 'Object'. | 2500 // Objects with a non-function constructor have class 'Object'. |
2500 __ CmpP(instance_type, Operand(JS_FUNCTION_TYPE)); | 2501 __ CmpP(instance_type, Operand(JS_FUNCTION_TYPE)); |
2501 if (String::Equals(isolate()->factory()->Object_string(), class_name)) { | 2502 if (String::Equals(isolate()->factory()->Object_string(), class_name)) { |
2502 __ bne(is_true); | 2503 __ bne(is_true); |
(...skipping 3155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5658 __ LoadP(result, | 5659 __ LoadP(result, |
5659 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5660 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
5660 __ bind(deferred->exit()); | 5661 __ bind(deferred->exit()); |
5661 __ bind(&done); | 5662 __ bind(&done); |
5662 } | 5663 } |
5663 | 5664 |
5664 #undef __ | 5665 #undef __ |
5665 | 5666 |
5666 } // namespace internal | 5667 } // namespace internal |
5667 } // namespace v8 | 5668 } // namespace v8 |
OLD | NEW |