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

Side by Side Diff: src/mips64/lithium-codegen-mips64.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/mips64/full-codegen-mips64.cc ('k') | src/mips64/lithium-mips64.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. 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/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/cpu-profiler.h" 9 #include "src/cpu-profiler.h"
10 #include "src/hydrogen-osr.h" 10 #include "src/hydrogen-osr.h"
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after
2036 } 2036 }
2037 } 2037 }
2038 2038
2039 2039
2040 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { 2040 void LCodeGen::DoArithmeticT(LArithmeticT* instr) {
2041 DCHECK(ToRegister(instr->context()).is(cp)); 2041 DCHECK(ToRegister(instr->context()).is(cp));
2042 DCHECK(ToRegister(instr->left()).is(a1)); 2042 DCHECK(ToRegister(instr->left()).is(a1));
2043 DCHECK(ToRegister(instr->right()).is(a0)); 2043 DCHECK(ToRegister(instr->right()).is(a0));
2044 DCHECK(ToRegister(instr->result()).is(v0)); 2044 DCHECK(ToRegister(instr->result()).is(v0));
2045 2045
2046 Handle<Code> code = CodeFactory::BinaryOpIC( 2046 Handle<Code> code =
2047 isolate(), instr->op(), instr->language_mode()).code(); 2047 CodeFactory::BinaryOpIC(isolate(), instr->op(), instr->strength()).code();
2048 CallCode(code, RelocInfo::CODE_TARGET, instr); 2048 CallCode(code, RelocInfo::CODE_TARGET, instr);
2049 // Other arch use a nop here, to signal that there is no inlined 2049 // Other arch use a nop here, to signal that there is no inlined
2050 // patchable code. Mips does not need the nop, since our marker 2050 // patchable code. Mips does not need the nop, since our marker
2051 // instruction (andi zero_reg) will never be used in normal code. 2051 // instruction (andi zero_reg) will never be used in normal code.
2052 } 2052 }
2053 2053
2054 2054
2055 template<class InstrType> 2055 template<class InstrType>
2056 void LCodeGen::EmitBranch(InstrType instr, 2056 void LCodeGen::EmitBranch(InstrType instr,
2057 Condition condition, 2057 Condition condition,
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
2522 UNREACHABLE(); 2522 UNREACHABLE();
2523 return kNoCondition; 2523 return kNoCondition;
2524 } 2524 }
2525 } 2525 }
2526 2526
2527 2527
2528 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { 2528 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
2529 DCHECK(ToRegister(instr->context()).is(cp)); 2529 DCHECK(ToRegister(instr->context()).is(cp));
2530 Token::Value op = instr->op(); 2530 Token::Value op = instr->op();
2531 2531
2532 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op, SLOPPY).code(); 2532 Handle<Code> ic =
2533 CodeFactory::CompareIC(isolate(), op, Strength::WEAK).code();
2533 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2534 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2534 2535
2535 Condition condition = ComputeCompareCondition(op); 2536 Condition condition = ComputeCompareCondition(op);
2536 2537
2537 EmitBranch(instr, condition, v0, Operand(zero_reg)); 2538 EmitBranch(instr, condition, v0, Operand(zero_reg));
2538 } 2539 }
2539 2540
2540 2541
2541 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { 2542 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) {
2542 InstanceType from = instr->from(); 2543 InstanceType from = instr->from();
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
2825 // restore all registers. 2826 // restore all registers.
2826 __ StoreToSafepointRegisterSlot(result, result); 2827 __ StoreToSafepointRegisterSlot(result, result);
2827 } 2828 }
2828 2829
2829 2830
2830 void LCodeGen::DoCmpT(LCmpT* instr) { 2831 void LCodeGen::DoCmpT(LCmpT* instr) {
2831 DCHECK(ToRegister(instr->context()).is(cp)); 2832 DCHECK(ToRegister(instr->context()).is(cp));
2832 Token::Value op = instr->op(); 2833 Token::Value op = instr->op();
2833 2834
2834 Handle<Code> ic = 2835 Handle<Code> ic =
2835 CodeFactory::CompareIC(isolate(), op, instr->language_mode()).code(); 2836 CodeFactory::CompareIC(isolate(), op, instr->strength()).code();
2836 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2837 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2837 // On MIPS there is no need for a "no inlined smi code" marker (nop). 2838 // On MIPS there is no need for a "no inlined smi code" marker (nop).
2838 2839
2839 Condition condition = ComputeCompareCondition(op); 2840 Condition condition = ComputeCompareCondition(op);
2840 // A minor optimization that relies on LoadRoot always emitting one 2841 // A minor optimization that relies on LoadRoot always emitting one
2841 // instruction. 2842 // instruction.
2842 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm()); 2843 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm());
2843 Label done, check; 2844 Label done, check;
2844 __ Branch(USE_DELAY_SLOT, &done, condition, v0, Operand(zero_reg)); 2845 __ Branch(USE_DELAY_SLOT, &done, condition, v0, Operand(zero_reg));
2845 __ bind(&check); 2846 __ bind(&check);
(...skipping 3271 matching lines...) Expand 10 before | Expand all | Expand 10 after
6117 __ Push(at, ToRegister(instr->function())); 6118 __ Push(at, ToRegister(instr->function()));
6118 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6119 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6119 RecordSafepoint(Safepoint::kNoLazyDeopt); 6120 RecordSafepoint(Safepoint::kNoLazyDeopt);
6120 } 6121 }
6121 6122
6122 6123
6123 #undef __ 6124 #undef __
6124 6125
6125 } // namespace internal 6126 } // namespace internal
6126 } // namespace v8 6127 } // namespace v8
OLDNEW
« no previous file with comments | « src/mips64/full-codegen-mips64.cc ('k') | src/mips64/lithium-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698