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

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

Issue 1144183004: [strong] Refactor ObjectStrength into a replacement for strong boolean args (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cl feedback and rebase Created 5 years, 6 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 2029 matching lines...) Expand 10 before | Expand all | Expand 10 after
2040 } 2040 }
2041 } 2041 }
2042 2042
2043 2043
2044 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { 2044 void LCodeGen::DoArithmeticT(LArithmeticT* instr) {
2045 DCHECK(ToRegister(instr->context()).is(cp)); 2045 DCHECK(ToRegister(instr->context()).is(cp));
2046 DCHECK(ToRegister(instr->left()).is(a1)); 2046 DCHECK(ToRegister(instr->left()).is(a1));
2047 DCHECK(ToRegister(instr->right()).is(a0)); 2047 DCHECK(ToRegister(instr->right()).is(a0));
2048 DCHECK(ToRegister(instr->result()).is(v0)); 2048 DCHECK(ToRegister(instr->result()).is(v0));
2049 2049
2050 Handle<Code> code = CodeFactory::BinaryOpIC( 2050 Handle<Code> code =
2051 isolate(), instr->op(), instr->language_mode()).code(); 2051 CodeFactory::BinaryOpIC(isolate(), instr->op(), instr->strength()).code();
2052 CallCode(code, RelocInfo::CODE_TARGET, instr); 2052 CallCode(code, RelocInfo::CODE_TARGET, instr);
2053 // Other arch use a nop here, to signal that there is no inlined 2053 // Other arch use a nop here, to signal that there is no inlined
2054 // patchable code. Mips does not need the nop, since our marker 2054 // patchable code. Mips does not need the nop, since our marker
2055 // instruction (andi zero_reg) will never be used in normal code. 2055 // instruction (andi zero_reg) will never be used in normal code.
2056 } 2056 }
2057 2057
2058 2058
2059 template<class InstrType> 2059 template<class InstrType>
2060 void LCodeGen::EmitBranch(InstrType instr, 2060 void LCodeGen::EmitBranch(InstrType instr,
2061 Condition condition, 2061 Condition condition,
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
2523 UNREACHABLE(); 2523 UNREACHABLE();
2524 return kNoCondition; 2524 return kNoCondition;
2525 } 2525 }
2526 } 2526 }
2527 2527
2528 2528
2529 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { 2529 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
2530 DCHECK(ToRegister(instr->context()).is(cp)); 2530 DCHECK(ToRegister(instr->context()).is(cp));
2531 Token::Value op = instr->op(); 2531 Token::Value op = instr->op();
2532 2532
2533 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op, SLOPPY).code(); 2533 Handle<Code> ic =
2534 CodeFactory::CompareIC(isolate(), op, Strength::WEAK).code();
2534 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2535 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2535 2536
2536 Condition condition = ComputeCompareCondition(op); 2537 Condition condition = ComputeCompareCondition(op);
2537 2538
2538 EmitBranch(instr, condition, v0, Operand(zero_reg)); 2539 EmitBranch(instr, condition, v0, Operand(zero_reg));
2539 } 2540 }
2540 2541
2541 2542
2542 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { 2543 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) {
2543 InstanceType from = instr->from(); 2544 InstanceType from = instr->from();
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
2826 // restore all registers. 2827 // restore all registers.
2827 __ StoreToSafepointRegisterSlot(result, result); 2828 __ StoreToSafepointRegisterSlot(result, result);
2828 } 2829 }
2829 2830
2830 2831
2831 void LCodeGen::DoCmpT(LCmpT* instr) { 2832 void LCodeGen::DoCmpT(LCmpT* instr) {
2832 DCHECK(ToRegister(instr->context()).is(cp)); 2833 DCHECK(ToRegister(instr->context()).is(cp));
2833 Token::Value op = instr->op(); 2834 Token::Value op = instr->op();
2834 2835
2835 Handle<Code> ic = 2836 Handle<Code> ic =
2836 CodeFactory::CompareIC(isolate(), op, instr->language_mode()).code(); 2837 CodeFactory::CompareIC(isolate(), op, instr->strength()).code();
2837 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2838 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2838 // On MIPS there is no need for a "no inlined smi code" marker (nop). 2839 // On MIPS there is no need for a "no inlined smi code" marker (nop).
2839 2840
2840 Condition condition = ComputeCompareCondition(op); 2841 Condition condition = ComputeCompareCondition(op);
2841 // A minor optimization that relies on LoadRoot always emitting one 2842 // A minor optimization that relies on LoadRoot always emitting one
2842 // instruction. 2843 // instruction.
2843 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm()); 2844 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm());
2844 Label done, check; 2845 Label done, check;
2845 __ Branch(USE_DELAY_SLOT, &done, condition, v0, Operand(zero_reg)); 2846 __ Branch(USE_DELAY_SLOT, &done, condition, v0, Operand(zero_reg));
2846 __ bind(&check); 2847 __ bind(&check);
(...skipping 3209 matching lines...) Expand 10 before | Expand all | Expand 10 after
6056 __ Push(at, ToRegister(instr->function())); 6057 __ Push(at, ToRegister(instr->function()));
6057 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6058 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6058 RecordSafepoint(Safepoint::kNoLazyDeopt); 6059 RecordSafepoint(Safepoint::kNoLazyDeopt);
6059 } 6060 }
6060 6061
6061 6062
6062 #undef __ 6063 #undef __
6063 6064
6064 } // namespace internal 6065 } // namespace internal
6065 } // namespace v8 6066 } // namespace v8
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