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 5438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5449 | 5449 |
5450 void LCodeGen::DoTypeof(LTypeof* instr) { | 5450 void LCodeGen::DoTypeof(LTypeof* instr) { |
5451 DCHECK(ToRegister(instr->value()).is(x3)); | 5451 DCHECK(ToRegister(instr->value()).is(x3)); |
5452 DCHECK(ToRegister(instr->result()).is(x0)); | 5452 DCHECK(ToRegister(instr->result()).is(x0)); |
5453 Label end, do_call; | 5453 Label end, do_call; |
5454 Register value_register = ToRegister(instr->value()); | 5454 Register value_register = ToRegister(instr->value()); |
5455 __ JumpIfNotSmi(value_register, &do_call); | 5455 __ JumpIfNotSmi(value_register, &do_call); |
5456 __ Mov(x0, Immediate(isolate()->factory()->number_string())); | 5456 __ Mov(x0, Immediate(isolate()->factory()->number_string())); |
5457 __ B(&end); | 5457 __ B(&end); |
5458 __ Bind(&do_call); | 5458 __ Bind(&do_call); |
5459 TypeofStub stub(isolate()); | 5459 Callable callable = CodeFactory::Typeof(isolate()); |
5460 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 5460 CallCode(callable.code(), RelocInfo::CODE_TARGET, instr); |
5461 __ Bind(&end); | 5461 __ Bind(&end); |
5462 } | 5462 } |
5463 | 5463 |
5464 | 5464 |
5465 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { | 5465 void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { |
5466 Handle<String> type_name = instr->type_literal(); | 5466 Handle<String> type_name = instr->type_literal(); |
5467 Label* true_label = instr->TrueLabel(chunk_); | 5467 Label* true_label = instr->TrueLabel(chunk_); |
5468 Label* false_label = instr->FalseLabel(chunk_); | 5468 Label* false_label = instr->FalseLabel(chunk_); |
5469 Register value = ToRegister(instr->value()); | 5469 Register value = ToRegister(instr->value()); |
5470 | 5470 |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5699 // Index is equal to negated out of object property index plus 1. | 5699 // Index is equal to negated out of object property index plus 1. |
5700 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5700 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
5701 __ Ldr(result, FieldMemOperand(result, | 5701 __ Ldr(result, FieldMemOperand(result, |
5702 FixedArray::kHeaderSize - kPointerSize)); | 5702 FixedArray::kHeaderSize - kPointerSize)); |
5703 __ Bind(deferred->exit()); | 5703 __ Bind(deferred->exit()); |
5704 __ Bind(&done); | 5704 __ Bind(&done); |
5705 } | 5705 } |
5706 | 5706 |
5707 } // namespace internal | 5707 } // namespace internal |
5708 } // namespace v8 | 5708 } // namespace v8 |
OLD | NEW |