| 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/arm64/macro-assembler-arm64-inl.h" | 8 #include "src/arm64/macro-assembler-arm64-inl.h" |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/builtins/builtins-constructor.h" | 10 #include "src/builtins/builtins-constructor.h" |
| (...skipping 5334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5345 | 5345 |
| 5346 void LCodeGen::DoTypeof(LTypeof* instr) { | 5346 void LCodeGen::DoTypeof(LTypeof* instr) { |
| 5347 DCHECK(ToRegister(instr->value()).is(x3)); | 5347 DCHECK(ToRegister(instr->value()).is(x3)); |
| 5348 DCHECK(ToRegister(instr->result()).is(x0)); | 5348 DCHECK(ToRegister(instr->result()).is(x0)); |
| 5349 Label end, do_call; | 5349 Label end, do_call; |
| 5350 Register value_register = ToRegister(instr->value()); | 5350 Register value_register = ToRegister(instr->value()); |
| 5351 __ JumpIfNotSmi(value_register, &do_call); | 5351 __ JumpIfNotSmi(value_register, &do_call); |
| 5352 __ Mov(x0, Immediate(isolate()->factory()->number_string())); | 5352 __ Mov(x0, Immediate(isolate()->factory()->number_string())); |
| 5353 __ B(&end); | 5353 __ B(&end); |
| 5354 __ Bind(&do_call); | 5354 __ Bind(&do_call); |
| 5355 Callable callable = CodeFactory::Typeof(isolate()); | 5355 Callable callable = Builtins::CallableFor(isolate(), Builtins::kTypeof); |
| 5356 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr); | 5356 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr); |
| 5357 __ Bind(&end); | 5357 __ Bind(&end); |
| 5358 } | 5358 } |
| 5359 | 5359 |
| 5360 | 5360 |
| 5361 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { | 5361 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { |
| 5362 Handle<String> type_name = instr->type_literal(); | 5362 Handle<String> type_name = instr->type_literal(); |
| 5363 Label* true_label = instr->TrueLabel(chunk_); | 5363 Label* true_label = instr->TrueLabel(chunk_); |
| 5364 Label* false_label = instr->FalseLabel(chunk_); | 5364 Label* false_label = instr->FalseLabel(chunk_); |
| 5365 Register value = ToRegister(instr->value()); | 5365 Register value = ToRegister(instr->value()); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5581 // Index is equal to negated out of object property index plus 1. | 5581 // Index is equal to negated out of object property index plus 1. |
| 5582 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5582 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 5583 __ Ldr(result, FieldMemOperand(result, | 5583 __ Ldr(result, FieldMemOperand(result, |
| 5584 FixedArray::kHeaderSize - kPointerSize)); | 5584 FixedArray::kHeaderSize - kPointerSize)); |
| 5585 __ Bind(deferred->exit()); | 5585 __ Bind(deferred->exit()); |
| 5586 __ Bind(&done); | 5586 __ Bind(&done); |
| 5587 } | 5587 } |
| 5588 | 5588 |
| 5589 } // namespace internal | 5589 } // namespace internal |
| 5590 } // namespace v8 | 5590 } // namespace v8 |
| OLD | NEW |