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

Side by Side Diff: src/arm/lithium-codegen-arm.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: everything should work now 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
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 2145 matching lines...) Expand 10 before | Expand all | Expand 10 after
2156 } 2156 }
2157 } 2157 }
2158 2158
2159 2159
2160 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { 2160 void LCodeGen::DoArithmeticT(LArithmeticT* instr) {
2161 DCHECK(ToRegister(instr->context()).is(cp)); 2161 DCHECK(ToRegister(instr->context()).is(cp));
2162 DCHECK(ToRegister(instr->left()).is(r1)); 2162 DCHECK(ToRegister(instr->left()).is(r1));
2163 DCHECK(ToRegister(instr->right()).is(r0)); 2163 DCHECK(ToRegister(instr->right()).is(r0));
2164 DCHECK(ToRegister(instr->result()).is(r0)); 2164 DCHECK(ToRegister(instr->result()).is(r0));
2165 2165
2166 Handle<Code> code = CodeFactory::BinaryOpIC( 2166 Handle<Code> code =
2167 isolate(), instr->op(), instr->language_mode()).code(); 2167 CodeFactory::BinaryOpIC(isolate(), instr->op(), instr->strength()).code();
2168 // Block literal pool emission to ensure nop indicating no inlined smi code 2168 // Block literal pool emission to ensure nop indicating no inlined smi code
2169 // is in the correct position. 2169 // is in the correct position.
2170 Assembler::BlockConstPoolScope block_const_pool(masm()); 2170 Assembler::BlockConstPoolScope block_const_pool(masm());
2171 CallCode(code, RelocInfo::CODE_TARGET, instr); 2171 CallCode(code, RelocInfo::CODE_TARGET, instr);
2172 } 2172 }
2173 2173
2174 2174
2175 template<class InstrType> 2175 template<class InstrType>
2176 void LCodeGen::EmitBranch(InstrType instr, Condition condition) { 2176 void LCodeGen::EmitBranch(InstrType instr, Condition condition) {
2177 int left_block = instr->TrueDestination(chunk_); 2177 int left_block = instr->TrueDestination(chunk_);
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
2593 UNREACHABLE(); 2593 UNREACHABLE();
2594 return kNoCondition; 2594 return kNoCondition;
2595 } 2595 }
2596 } 2596 }
2597 2597
2598 2598
2599 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { 2599 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
2600 DCHECK(ToRegister(instr->context()).is(cp)); 2600 DCHECK(ToRegister(instr->context()).is(cp));
2601 Token::Value op = instr->op(); 2601 Token::Value op = instr->op();
2602 2602
2603 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op, SLOPPY).code(); 2603 Handle<Code> ic =
2604 CodeFactory::CompareIC(isolate(), op, Strength::WEAK).code();
2604 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2605 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2605 // This instruction also signals no smi code inlined. 2606 // This instruction also signals no smi code inlined.
2606 __ cmp(r0, Operand::Zero()); 2607 __ cmp(r0, Operand::Zero());
2607 2608
2608 Condition condition = ComputeCompareCondition(op); 2609 Condition condition = ComputeCompareCondition(op);
2609 2610
2610 EmitBranch(instr, condition); 2611 EmitBranch(instr, condition);
2611 } 2612 }
2612 2613
2613 2614
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
2911 // restore all registers. 2912 // restore all registers.
2912 __ StoreToSafepointRegisterSlot(r0, ToRegister(instr->result())); 2913 __ StoreToSafepointRegisterSlot(r0, ToRegister(instr->result()));
2913 } 2914 }
2914 2915
2915 2916
2916 void LCodeGen::DoCmpT(LCmpT* instr) { 2917 void LCodeGen::DoCmpT(LCmpT* instr) {
2917 DCHECK(ToRegister(instr->context()).is(cp)); 2918 DCHECK(ToRegister(instr->context()).is(cp));
2918 Token::Value op = instr->op(); 2919 Token::Value op = instr->op();
2919 2920
2920 Handle<Code> ic = 2921 Handle<Code> ic =
2921 CodeFactory::CompareIC(isolate(), op, instr->language_mode()).code(); 2922 CodeFactory::CompareIC(isolate(), op, instr->strength()).code();
2922 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2923 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2923 // This instruction also signals no smi code inlined. 2924 // This instruction also signals no smi code inlined.
2924 __ cmp(r0, Operand::Zero()); 2925 __ cmp(r0, Operand::Zero());
2925 2926
2926 Condition condition = ComputeCompareCondition(op); 2927 Condition condition = ComputeCompareCondition(op);
2927 __ LoadRoot(ToRegister(instr->result()), 2928 __ LoadRoot(ToRegister(instr->result()),
2928 Heap::kTrueValueRootIndex, 2929 Heap::kTrueValueRootIndex,
2929 condition); 2930 condition);
2930 __ LoadRoot(ToRegister(instr->result()), 2931 __ LoadRoot(ToRegister(instr->result()),
2931 Heap::kFalseValueRootIndex, 2932 Heap::kFalseValueRootIndex,
(...skipping 3076 matching lines...) Expand 10 before | Expand all | Expand 10 after
6008 __ push(ToRegister(instr->function())); 6009 __ push(ToRegister(instr->function()));
6009 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6010 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6010 RecordSafepoint(Safepoint::kNoLazyDeopt); 6011 RecordSafepoint(Safepoint::kNoLazyDeopt);
6011 } 6012 }
6012 6013
6013 6014
6014 #undef __ 6015 #undef __
6015 6016
6016 } // namespace internal 6017 } // namespace internal
6017 } // namespace v8 6018 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm64/code-stubs-arm64.cc » ('j') | src/compiler/js-operator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698