| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
| 6 | 6 |
| 7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
| 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 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2198 Handle<String> class_name = instr->hydrogen()->class_name(); | 2198 Handle<String> class_name = instr->hydrogen()->class_name(); |
| 2199 Label* true_label = instr->TrueLabel(chunk_); | 2199 Label* true_label = instr->TrueLabel(chunk_); |
| 2200 Label* false_label = instr->FalseLabel(chunk_); | 2200 Label* false_label = instr->FalseLabel(chunk_); |
| 2201 Register input = ToRegister(instr->value()); | 2201 Register input = ToRegister(instr->value()); |
| 2202 Register scratch1 = ToRegister(instr->temp1()); | 2202 Register scratch1 = ToRegister(instr->temp1()); |
| 2203 Register scratch2 = ToRegister(instr->temp2()); | 2203 Register scratch2 = ToRegister(instr->temp2()); |
| 2204 | 2204 |
| 2205 __ JumpIfSmi(input, false_label); | 2205 __ JumpIfSmi(input, false_label); |
| 2206 | 2206 |
| 2207 Register map = scratch2; | 2207 Register map = scratch2; |
| 2208 __ CompareObjectType(input, map, scratch1, JS_FUNCTION_TYPE); | 2208 __ CompareObjectType(input, map, scratch1, FIRST_FUNCTION_TYPE); |
| 2209 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE); |
| 2209 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { | 2210 if (String::Equals(isolate()->factory()->Function_string(), class_name)) { |
| 2210 __ B(eq, true_label); | 2211 __ B(hs, true_label); |
| 2211 } else { | 2212 } else { |
| 2212 __ B(eq, false_label); | 2213 __ B(hs, false_label); |
| 2213 } | 2214 } |
| 2214 | 2215 |
| 2215 // Check if the constructor in the map is a function. | 2216 // Check if the constructor in the map is a function. |
| 2216 { | 2217 { |
| 2217 UseScratchRegisterScope temps(masm()); | 2218 UseScratchRegisterScope temps(masm()); |
| 2218 Register instance_type = temps.AcquireX(); | 2219 Register instance_type = temps.AcquireX(); |
| 2219 __ GetMapConstructor(scratch1, map, scratch2, instance_type); | 2220 __ GetMapConstructor(scratch1, map, scratch2, instance_type); |
| 2220 __ Cmp(instance_type, JS_FUNCTION_TYPE); | 2221 __ Cmp(instance_type, JS_FUNCTION_TYPE); |
| 2221 } | 2222 } |
| 2222 // Objects with a non-function constructor have class 'Object'. | 2223 // Objects with a non-function constructor have class 'Object'. |
| (...skipping 3502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5725 // Index is equal to negated out of object property index plus 1. | 5726 // Index is equal to negated out of object property index plus 1. |
| 5726 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5727 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 5727 __ Ldr(result, FieldMemOperand(result, | 5728 __ Ldr(result, FieldMemOperand(result, |
| 5728 FixedArray::kHeaderSize - kPointerSize)); | 5729 FixedArray::kHeaderSize - kPointerSize)); |
| 5729 __ Bind(deferred->exit()); | 5730 __ Bind(deferred->exit()); |
| 5730 __ Bind(&done); | 5731 __ Bind(&done); |
| 5731 } | 5732 } |
| 5732 | 5733 |
| 5733 } // namespace internal | 5734 } // namespace internal |
| 5734 } // namespace v8 | 5735 } // namespace v8 |
| OLD | NEW |