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

Side by Side Diff: src/ia32/lithium-codegen-ia32.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/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.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 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
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 2046 matching lines...) Expand 10 before | Expand all | Expand 10 after
2057 } 2057 }
2058 } 2058 }
2059 2059
2060 2060
2061 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { 2061 void LCodeGen::DoArithmeticT(LArithmeticT* instr) {
2062 DCHECK(ToRegister(instr->context()).is(esi)); 2062 DCHECK(ToRegister(instr->context()).is(esi));
2063 DCHECK(ToRegister(instr->left()).is(edx)); 2063 DCHECK(ToRegister(instr->left()).is(edx));
2064 DCHECK(ToRegister(instr->right()).is(eax)); 2064 DCHECK(ToRegister(instr->right()).is(eax));
2065 DCHECK(ToRegister(instr->result()).is(eax)); 2065 DCHECK(ToRegister(instr->result()).is(eax));
2066 2066
2067 Handle<Code> code = CodeFactory::BinaryOpIC( 2067 Handle<Code> code =
2068 isolate(), instr->op(), instr->language_mode()).code(); 2068 CodeFactory::BinaryOpIC(isolate(), instr->op(), instr->strength()).code();
2069 CallCode(code, RelocInfo::CODE_TARGET, instr); 2069 CallCode(code, RelocInfo::CODE_TARGET, instr);
2070 } 2070 }
2071 2071
2072 2072
2073 template<class InstrType> 2073 template<class InstrType>
2074 void LCodeGen::EmitBranch(InstrType instr, Condition cc) { 2074 void LCodeGen::EmitBranch(InstrType instr, Condition cc) {
2075 int left_block = instr->TrueDestination(chunk_); 2075 int left_block = instr->TrueDestination(chunk_);
2076 int right_block = instr->FalseDestination(chunk_); 2076 int right_block = instr->FalseDestination(chunk_);
2077 2077
2078 int next_block = GetNextEmittedBlock(); 2078 int next_block = GetNextEmittedBlock();
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
2484 default: 2484 default:
2485 UNREACHABLE(); 2485 UNREACHABLE();
2486 return no_condition; 2486 return no_condition;
2487 } 2487 }
2488 } 2488 }
2489 2489
2490 2490
2491 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { 2491 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
2492 Token::Value op = instr->op(); 2492 Token::Value op = instr->op();
2493 2493
2494 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op, SLOPPY).code(); 2494 Handle<Code> ic =
2495 CodeFactory::CompareIC(isolate(), op, Strength::WEAK).code();
2495 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2496 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2496 2497
2497 Condition condition = ComputeCompareCondition(op); 2498 Condition condition = ComputeCompareCondition(op);
2498 __ test(eax, Operand(eax)); 2499 __ test(eax, Operand(eax));
2499 2500
2500 EmitBranch(instr, condition); 2501 EmitBranch(instr, condition);
2501 } 2502 }
2502 2503
2503 2504
2504 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { 2505 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) {
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
2756 2757
2757 // Put the result value into the eax slot and restore all registers. 2758 // Put the result value into the eax slot and restore all registers.
2758 __ StoreToSafepointRegisterSlot(eax, eax); 2759 __ StoreToSafepointRegisterSlot(eax, eax);
2759 } 2760 }
2760 2761
2761 2762
2762 void LCodeGen::DoCmpT(LCmpT* instr) { 2763 void LCodeGen::DoCmpT(LCmpT* instr) {
2763 Token::Value op = instr->op(); 2764 Token::Value op = instr->op();
2764 2765
2765 Handle<Code> ic = 2766 Handle<Code> ic =
2766 CodeFactory::CompareIC(isolate(), op, instr->language_mode()).code(); 2767 CodeFactory::CompareIC(isolate(), op, instr->strength()).code();
2767 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2768 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2768 2769
2769 Condition condition = ComputeCompareCondition(op); 2770 Condition condition = ComputeCompareCondition(op);
2770 Label true_value, done; 2771 Label true_value, done;
2771 __ test(eax, Operand(eax)); 2772 __ test(eax, Operand(eax));
2772 __ j(condition, &true_value, Label::kNear); 2773 __ j(condition, &true_value, Label::kNear);
2773 __ mov(ToRegister(instr->result()), factory()->false_value()); 2774 __ mov(ToRegister(instr->result()), factory()->false_value());
2774 __ jmp(&done, Label::kNear); 2775 __ jmp(&done, Label::kNear);
2775 __ bind(&true_value); 2776 __ bind(&true_value);
2776 __ mov(ToRegister(instr->result()), factory()->true_value()); 2777 __ mov(ToRegister(instr->result()), factory()->true_value());
(...skipping 3051 matching lines...) Expand 10 before | Expand all | Expand 10 after
5828 RecordSafepoint(Safepoint::kNoLazyDeopt); 5829 RecordSafepoint(Safepoint::kNoLazyDeopt);
5829 } 5830 }
5830 5831
5831 5832
5832 #undef __ 5833 #undef __
5833 5834
5834 } // namespace internal 5835 } // namespace internal
5835 } // namespace v8 5836 } // namespace v8
5836 5837
5837 #endif // V8_TARGET_ARCH_IA32 5838 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698