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

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

Issue 1130283002: [strong] Disallow implicit conversions for comparison (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cl feedback Created 5 years, 7 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
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/arm/lithium-codegen-arm.h" 7 #include "src/arm/lithium-codegen-arm.h"
8 #include "src/arm/lithium-gap-resolver-arm.h" 8 #include "src/arm/lithium-gap-resolver-arm.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 2593 matching lines...) Expand 10 before | Expand all | Expand 10 after
2604 UNREACHABLE(); 2604 UNREACHABLE();
2605 return kNoCondition; 2605 return kNoCondition;
2606 } 2606 }
2607 } 2607 }
2608 2608
2609 2609
2610 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { 2610 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
2611 DCHECK(ToRegister(instr->context()).is(cp)); 2611 DCHECK(ToRegister(instr->context()).is(cp));
2612 Token::Value op = instr->op(); 2612 Token::Value op = instr->op();
2613 2613
2614 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); 2614 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op, SLOPPY).code();
2615 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2615 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2616 // This instruction also signals no smi code inlined. 2616 // This instruction also signals no smi code inlined.
2617 __ cmp(r0, Operand::Zero()); 2617 __ cmp(r0, Operand::Zero());
2618 2618
2619 Condition condition = ComputeCompareCondition(op); 2619 Condition condition = ComputeCompareCondition(op);
2620 2620
2621 EmitBranch(instr, condition); 2621 EmitBranch(instr, condition);
2622 } 2622 }
2623 2623
2624 2624
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
2921 // Put the result value (r0) into the result register slot and 2921 // Put the result value (r0) into the result register slot and
2922 // restore all registers. 2922 // restore all registers.
2923 __ StoreToSafepointRegisterSlot(r0, ToRegister(instr->result())); 2923 __ StoreToSafepointRegisterSlot(r0, ToRegister(instr->result()));
2924 } 2924 }
2925 2925
2926 2926
2927 void LCodeGen::DoCmpT(LCmpT* instr) { 2927 void LCodeGen::DoCmpT(LCmpT* instr) {
2928 DCHECK(ToRegister(instr->context()).is(cp)); 2928 DCHECK(ToRegister(instr->context()).is(cp));
2929 Token::Value op = instr->op(); 2929 Token::Value op = instr->op();
2930 2930
2931 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); 2931 Handle<Code> ic =
2932 CodeFactory::CompareIC(isolate(), op, instr->language_mode()).code();
2932 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2933 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2933 // This instruction also signals no smi code inlined. 2934 // This instruction also signals no smi code inlined.
2934 __ cmp(r0, Operand::Zero()); 2935 __ cmp(r0, Operand::Zero());
2935 2936
2936 Condition condition = ComputeCompareCondition(op); 2937 Condition condition = ComputeCompareCondition(op);
2937 __ LoadRoot(ToRegister(instr->result()), 2938 __ LoadRoot(ToRegister(instr->result()),
2938 Heap::kTrueValueRootIndex, 2939 Heap::kTrueValueRootIndex,
2939 condition); 2940 condition);
2940 __ LoadRoot(ToRegister(instr->result()), 2941 __ LoadRoot(ToRegister(instr->result()),
2941 Heap::kFalseValueRootIndex, 2942 Heap::kFalseValueRootIndex,
(...skipping 3010 matching lines...) Expand 10 before | Expand all | Expand 10 after
5952 __ Push(scope_info); 5953 __ Push(scope_info);
5953 __ push(ToRegister(instr->function())); 5954 __ push(ToRegister(instr->function()));
5954 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5955 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5955 RecordSafepoint(Safepoint::kNoLazyDeopt); 5956 RecordSafepoint(Safepoint::kNoLazyDeopt);
5956 } 5957 }
5957 5958
5958 5959
5959 #undef __ 5960 #undef __
5960 5961
5961 } } // namespace v8::internal 5962 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698