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

Side by Side Diff: src/mips/lithium-codegen-mips.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/mips/full-codegen-mips.cc ('k') | src/mips/lithium-mips.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 2012 the V8 project authors. All rights reserved.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2524 matching lines...) Expand 10 before | Expand all | Expand 10 after
2535 UNREACHABLE(); 2535 UNREACHABLE();
2536 return kNoCondition; 2536 return kNoCondition;
2537 } 2537 }
2538 } 2538 }
2539 2539
2540 2540
2541 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { 2541 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
2542 DCHECK(ToRegister(instr->context()).is(cp)); 2542 DCHECK(ToRegister(instr->context()).is(cp));
2543 Token::Value op = instr->op(); 2543 Token::Value op = instr->op();
2544 2544
2545 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); 2545 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op, SLOPPY).code();
2546 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2546 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2547 2547
2548 Condition condition = ComputeCompareCondition(op); 2548 Condition condition = ComputeCompareCondition(op);
2549 2549
2550 EmitBranch(instr, condition, v0, Operand(zero_reg)); 2550 EmitBranch(instr, condition, v0, Operand(zero_reg));
2551 } 2551 }
2552 2552
2553 2553
2554 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { 2554 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) {
2555 InstanceType from = instr->from(); 2555 InstanceType from = instr->from();
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
2837 // Put the result value into the result register slot and 2837 // Put the result value into the result register slot and
2838 // restore all registers. 2838 // restore all registers.
2839 __ StoreToSafepointRegisterSlot(result, result); 2839 __ StoreToSafepointRegisterSlot(result, result);
2840 } 2840 }
2841 2841
2842 2842
2843 void LCodeGen::DoCmpT(LCmpT* instr) { 2843 void LCodeGen::DoCmpT(LCmpT* instr) {
2844 DCHECK(ToRegister(instr->context()).is(cp)); 2844 DCHECK(ToRegister(instr->context()).is(cp));
2845 Token::Value op = instr->op(); 2845 Token::Value op = instr->op();
2846 2846
2847 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); 2847 Handle<Code> ic =
2848 CodeFactory::CompareIC(isolate(), op, instr->language_mode()).code();
2848 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2849 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2849 // On MIPS there is no need for a "no inlined smi code" marker (nop). 2850 // On MIPS there is no need for a "no inlined smi code" marker (nop).
2850 2851
2851 Condition condition = ComputeCompareCondition(op); 2852 Condition condition = ComputeCompareCondition(op);
2852 // A minor optimization that relies on LoadRoot always emitting one 2853 // A minor optimization that relies on LoadRoot always emitting one
2853 // instruction. 2854 // instruction.
2854 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm()); 2855 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm());
2855 Label done, check; 2856 Label done, check;
2856 __ Branch(USE_DELAY_SLOT, &done, condition, v0, Operand(zero_reg)); 2857 __ Branch(USE_DELAY_SLOT, &done, condition, v0, Operand(zero_reg));
2857 __ bind(&check); 2858 __ bind(&check);
(...skipping 3143 matching lines...) Expand 10 before | Expand all | Expand 10 after
6001 __ li(at, scope_info); 6002 __ li(at, scope_info);
6002 __ Push(at, ToRegister(instr->function())); 6003 __ Push(at, ToRegister(instr->function()));
6003 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6004 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6004 RecordSafepoint(Safepoint::kNoLazyDeopt); 6005 RecordSafepoint(Safepoint::kNoLazyDeopt);
6005 } 6006 }
6006 6007
6007 6008
6008 #undef __ 6009 #undef __
6009 6010
6010 } } // namespace v8::internal 6011 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698