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

Side by Side Diff: src/x64/lithium-codegen-x64.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/x64/full-codegen-x64.cc ('k') | src/x64/lithium-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_X64 7 #if V8_TARGET_ARCH_X64
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 2081 matching lines...) Expand 10 before | Expand all | Expand 10 after
2092 } 2092 }
2093 } 2093 }
2094 2094
2095 2095
2096 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { 2096 void LCodeGen::DoArithmeticT(LArithmeticT* instr) {
2097 DCHECK(ToRegister(instr->context()).is(rsi)); 2097 DCHECK(ToRegister(instr->context()).is(rsi));
2098 DCHECK(ToRegister(instr->left()).is(rdx)); 2098 DCHECK(ToRegister(instr->left()).is(rdx));
2099 DCHECK(ToRegister(instr->right()).is(rax)); 2099 DCHECK(ToRegister(instr->right()).is(rax));
2100 DCHECK(ToRegister(instr->result()).is(rax)); 2100 DCHECK(ToRegister(instr->result()).is(rax));
2101 2101
2102 Handle<Code> code = CodeFactory::BinaryOpIC( 2102 Handle<Code> code =
2103 isolate(), instr->op(), instr->language_mode()).code(); 2103 CodeFactory::BinaryOpIC(isolate(), instr->op(), instr->strength()).code();
2104 CallCode(code, RelocInfo::CODE_TARGET, instr); 2104 CallCode(code, RelocInfo::CODE_TARGET, instr);
2105 } 2105 }
2106 2106
2107 2107
2108 template<class InstrType> 2108 template<class InstrType>
2109 void LCodeGen::EmitBranch(InstrType instr, Condition cc) { 2109 void LCodeGen::EmitBranch(InstrType instr, Condition cc) {
2110 int left_block = instr->TrueDestination(chunk_); 2110 int left_block = instr->TrueDestination(chunk_);
2111 int right_block = instr->FalseDestination(chunk_); 2111 int right_block = instr->FalseDestination(chunk_);
2112 2112
2113 int next_block = GetNextEmittedBlock(); 2113 int next_block = GetNextEmittedBlock();
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
2536 __ testb(FieldOperand(temp, Map::kBitFieldOffset), 2536 __ testb(FieldOperand(temp, Map::kBitFieldOffset),
2537 Immediate(1 << Map::kIsUndetectable)); 2537 Immediate(1 << Map::kIsUndetectable));
2538 EmitBranch(instr, not_zero); 2538 EmitBranch(instr, not_zero);
2539 } 2539 }
2540 2540
2541 2541
2542 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { 2542 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
2543 DCHECK(ToRegister(instr->context()).is(rsi)); 2543 DCHECK(ToRegister(instr->context()).is(rsi));
2544 Token::Value op = instr->op(); 2544 Token::Value op = instr->op();
2545 2545
2546 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op, SLOPPY).code(); 2546 Handle<Code> ic =
2547 CodeFactory::CompareIC(isolate(), op, Strength::WEAK).code();
2547 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2548 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2548 2549
2549 Condition condition = TokenToCondition(op, false); 2550 Condition condition = TokenToCondition(op, false);
2550 __ testp(rax, rax); 2551 __ testp(rax, rax);
2551 2552
2552 EmitBranch(instr, condition); 2553 EmitBranch(instr, condition);
2553 } 2554 }
2554 2555
2555 2556
2556 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { 2557 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) {
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
2821 __ LoadRoot(rax, Heap::kFalseValueRootIndex); 2822 __ LoadRoot(rax, Heap::kFalseValueRootIndex);
2822 __ bind(&done); 2823 __ bind(&done);
2823 } 2824 }
2824 2825
2825 2826
2826 void LCodeGen::DoCmpT(LCmpT* instr) { 2827 void LCodeGen::DoCmpT(LCmpT* instr) {
2827 DCHECK(ToRegister(instr->context()).is(rsi)); 2828 DCHECK(ToRegister(instr->context()).is(rsi));
2828 Token::Value op = instr->op(); 2829 Token::Value op = instr->op();
2829 2830
2830 Handle<Code> ic = 2831 Handle<Code> ic =
2831 CodeFactory::CompareIC(isolate(), op, instr->language_mode()).code(); 2832 CodeFactory::CompareIC(isolate(), op, instr->strength()).code();
2832 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2833 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2833 2834
2834 Condition condition = TokenToCondition(op, false); 2835 Condition condition = TokenToCondition(op, false);
2835 Label true_value, done; 2836 Label true_value, done;
2836 __ testp(rax, rax); 2837 __ testp(rax, rax);
2837 __ j(condition, &true_value, Label::kNear); 2838 __ j(condition, &true_value, Label::kNear);
2838 __ LoadRoot(ToRegister(instr->result()), Heap::kFalseValueRootIndex); 2839 __ LoadRoot(ToRegister(instr->result()), Heap::kFalseValueRootIndex);
2839 __ jmp(&done, Label::kNear); 2840 __ jmp(&done, Label::kNear);
2840 __ bind(&true_value); 2841 __ bind(&true_value);
2841 __ LoadRoot(ToRegister(instr->result()), Heap::kTrueValueRootIndex); 2842 __ LoadRoot(ToRegister(instr->result()), Heap::kTrueValueRootIndex);
(...skipping 3185 matching lines...) Expand 10 before | Expand all | Expand 10 after
6027 RecordSafepoint(Safepoint::kNoLazyDeopt); 6028 RecordSafepoint(Safepoint::kNoLazyDeopt);
6028 } 6029 }
6029 6030
6030 6031
6031 #undef __ 6032 #undef __
6032 6033
6033 } // namespace internal 6034 } // namespace internal
6034 } // namespace v8 6035 } // namespace v8
6035 6036
6036 #endif // V8_TARGET_ARCH_X64 6037 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698