Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1030)

Side by Side Diff: src/arm64/lithium-codegen-arm64.cc

Issue 1092353002: [strong] Disallow implicit conversions for binary arithmetic operations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cl feedback 5 Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/builtins.h » ('j') | src/ic/ic.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698