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

Side by Side Diff: src/ppc/lithium-codegen-ppc.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/ppc/full-codegen-ppc.cc ('k') | src/ppc/lithium-ppc.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/cpu-profiler.h" 10 #include "src/cpu-profiler.h"
(...skipping 2653 matching lines...) Expand 10 before | Expand all | Expand 10 after
2664 UNREACHABLE(); 2664 UNREACHABLE();
2665 return kNoCondition; 2665 return kNoCondition;
2666 } 2666 }
2667 } 2667 }
2668 2668
2669 2669
2670 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { 2670 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
2671 DCHECK(ToRegister(instr->context()).is(cp)); 2671 DCHECK(ToRegister(instr->context()).is(cp));
2672 Token::Value op = instr->op(); 2672 Token::Value op = instr->op();
2673 2673
2674 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); 2674 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op, SLOPPY).code();
2675 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2675 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2676 // This instruction also signals no smi code inlined 2676 // This instruction also signals no smi code inlined
2677 __ cmpi(r3, Operand::Zero()); 2677 __ cmpi(r3, Operand::Zero());
2678 2678
2679 Condition condition = ComputeCompareCondition(op); 2679 Condition condition = ComputeCompareCondition(op);
2680 2680
2681 EmitBranch(instr, condition); 2681 EmitBranch(instr, condition);
2682 } 2682 }
2683 2683
2684 2684
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
2971 // Put the result value (r3) into the result register slot and 2971 // Put the result value (r3) into the result register slot and
2972 // restore all registers. 2972 // restore all registers.
2973 __ StoreToSafepointRegisterSlot(r3, ToRegister(instr->result())); 2973 __ StoreToSafepointRegisterSlot(r3, ToRegister(instr->result()));
2974 } 2974 }
2975 2975
2976 2976
2977 void LCodeGen::DoCmpT(LCmpT* instr) { 2977 void LCodeGen::DoCmpT(LCmpT* instr) {
2978 DCHECK(ToRegister(instr->context()).is(cp)); 2978 DCHECK(ToRegister(instr->context()).is(cp));
2979 Token::Value op = instr->op(); 2979 Token::Value op = instr->op();
2980 2980
2981 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); 2981 Handle<Code> ic =
2982 CodeFactory::CompareIC(isolate(), op, instr->language_mode()).code();
2982 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2983 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2983 // This instruction also signals no smi code inlined 2984 // This instruction also signals no smi code inlined
2984 __ cmpi(r3, Operand::Zero()); 2985 __ cmpi(r3, Operand::Zero());
2985 2986
2986 Condition condition = ComputeCompareCondition(op); 2987 Condition condition = ComputeCompareCondition(op);
2987 if (CpuFeatures::IsSupported(ISELECT)) { 2988 if (CpuFeatures::IsSupported(ISELECT)) {
2988 __ LoadRoot(r4, Heap::kTrueValueRootIndex); 2989 __ LoadRoot(r4, Heap::kTrueValueRootIndex);
2989 __ LoadRoot(r5, Heap::kFalseValueRootIndex); 2990 __ LoadRoot(r5, Heap::kFalseValueRootIndex);
2990 __ isel(condition, ToRegister(instr->result()), r4, r5); 2991 __ isel(condition, ToRegister(instr->result()), r4, r5);
2991 } else { 2992 } else {
(...skipping 3223 matching lines...) Expand 10 before | Expand all | Expand 10 after
6215 __ Push(scope_info); 6216 __ Push(scope_info);
6216 __ push(ToRegister(instr->function())); 6217 __ push(ToRegister(instr->function()));
6217 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6218 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6218 RecordSafepoint(Safepoint::kNoLazyDeopt); 6219 RecordSafepoint(Safepoint::kNoLazyDeopt);
6219 } 6220 }
6220 6221
6221 6222
6222 #undef __ 6223 #undef __
6223 } 6224 }
6224 } // namespace v8::internal 6225 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ppc/full-codegen-ppc.cc ('k') | src/ppc/lithium-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698