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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arm64/lithium-codegen-arm64.h" | 7 #include "src/arm64/lithium-codegen-arm64.h" |
8 #include "src/arm64/lithium-gap-resolver-arm64.h" | 8 #include "src/arm64/lithium-gap-resolver-arm64.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 DCHECK(is_generating()); | 661 DCHECK(is_generating()); |
662 | 662 |
663 if (info()->IsOptimizing()) { | 663 if (info()->IsOptimizing()) { |
664 ProfileEntryHookStub::MaybeCallEntryHook(masm_); | 664 ProfileEntryHookStub::MaybeCallEntryHook(masm_); |
665 | 665 |
666 // TODO(all): Add support for stop_t FLAG in DEBUG mode. | 666 // TODO(all): Add support for stop_t FLAG in DEBUG mode. |
667 | 667 |
668 // Sloppy mode functions and builtins need to replace the receiver with the | 668 // Sloppy mode functions and builtins need to replace the receiver with the |
669 // global proxy when called as functions (without an explicit receiver | 669 // global proxy when called as functions (without an explicit receiver |
670 // object). | 670 // object). |
671 if (graph()->this_has_uses() && is_sloppy(info_->language_mode()) && | 671 if (graph()->this_has_uses() && is_sloppy(info()->language_mode()) && |
672 !info_->is_native()) { | 672 !info_->is_native()) { |
673 Label ok; | 673 Label ok; |
674 int receiver_offset = info_->scope()->num_parameters() * kXRegSize; | 674 int receiver_offset = info_->scope()->num_parameters() * kXRegSize; |
675 __ Peek(x10, receiver_offset); | 675 __ Peek(x10, receiver_offset); |
676 __ JumpIfNotRoot(x10, Heap::kUndefinedValueRootIndex, &ok); | 676 __ JumpIfNotRoot(x10, Heap::kUndefinedValueRootIndex, &ok); |
677 | 677 |
678 __ Ldr(x10, GlobalObjectMemOperand()); | 678 __ Ldr(x10, GlobalObjectMemOperand()); |
679 __ Ldr(x10, FieldMemOperand(x10, GlobalObject::kGlobalProxyOffset)); | 679 __ Ldr(x10, FieldMemOperand(x10, GlobalObject::kGlobalProxyOffset)); |
680 __ Poke(x10, receiver_offset); | 680 __ Poke(x10, receiver_offset); |
681 | 681 |
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1765 } | 1765 } |
1766 } | 1766 } |
1767 | 1767 |
1768 | 1768 |
1769 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { | 1769 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { |
1770 DCHECK(ToRegister(instr->context()).is(cp)); | 1770 DCHECK(ToRegister(instr->context()).is(cp)); |
1771 DCHECK(ToRegister(instr->left()).is(x1)); | 1771 DCHECK(ToRegister(instr->left()).is(x1)); |
1772 DCHECK(ToRegister(instr->right()).is(x0)); | 1772 DCHECK(ToRegister(instr->right()).is(x0)); |
1773 DCHECK(ToRegister(instr->result()).is(x0)); | 1773 DCHECK(ToRegister(instr->result()).is(x0)); |
1774 | 1774 |
1775 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), instr->op()).code(); | 1775 Handle<Code> code = CodeFactory::BinaryOpIC( |
| 1776 isolate(), instr->op(), info()->language_mode()).code(); |
1776 CallCode(code, RelocInfo::CODE_TARGET, instr); | 1777 CallCode(code, RelocInfo::CODE_TARGET, instr); |
1777 } | 1778 } |
1778 | 1779 |
1779 | 1780 |
1780 void LCodeGen::DoBitI(LBitI* instr) { | 1781 void LCodeGen::DoBitI(LBitI* instr) { |
1781 Register result = ToRegister32(instr->result()); | 1782 Register result = ToRegister32(instr->result()); |
1782 Register left = ToRegister32(instr->left()); | 1783 Register left = ToRegister32(instr->left()); |
1783 Operand right = ToShiftedRightOperand32(instr->right(), instr); | 1784 Operand right = ToShiftedRightOperand32(instr->right(), instr); |
1784 | 1785 |
1785 switch (instr->op()) { | 1786 switch (instr->op()) { |
(...skipping 4225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6011 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6012 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6012 __ Push(scope_info); | 6013 __ Push(scope_info); |
6013 __ Push(ToRegister(instr->function())); | 6014 __ Push(ToRegister(instr->function())); |
6014 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6015 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6015 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6016 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6016 } | 6017 } |
6017 | 6018 |
6018 | 6019 |
6019 | 6020 |
6020 } } // namespace v8::internal | 6021 } } // namespace v8::internal |
OLD | NEW |