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

Side by Side Diff: src/crankshaft/x64/lithium-codegen-x64.cc

Issue 1693833002: Remove strong mode support from binary operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 4 years, 10 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 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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/crankshaft/x64/lithium-codegen-x64.h" 7 #include "src/crankshaft/x64/lithium-codegen-x64.h"
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 1929 matching lines...) Expand 10 before | Expand all | Expand 10 after
1940 } 1940 }
1941 } 1941 }
1942 1942
1943 1943
1944 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { 1944 void LCodeGen::DoArithmeticT(LArithmeticT* instr) {
1945 DCHECK(ToRegister(instr->context()).is(rsi)); 1945 DCHECK(ToRegister(instr->context()).is(rsi));
1946 DCHECK(ToRegister(instr->left()).is(rdx)); 1946 DCHECK(ToRegister(instr->left()).is(rdx));
1947 DCHECK(ToRegister(instr->right()).is(rax)); 1947 DCHECK(ToRegister(instr->right()).is(rax));
1948 DCHECK(ToRegister(instr->result()).is(rax)); 1948 DCHECK(ToRegister(instr->result()).is(rax));
1949 1949
1950 Handle<Code> code = 1950 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), instr->op()).code();
1951 CodeFactory::BinaryOpIC(isolate(), instr->op(), instr->strength()).code();
1952 CallCode(code, RelocInfo::CODE_TARGET, instr); 1951 CallCode(code, RelocInfo::CODE_TARGET, instr);
1953 } 1952 }
1954 1953
1955 1954
1956 template<class InstrType> 1955 template<class InstrType>
1957 void LCodeGen::EmitBranch(InstrType instr, Condition cc) { 1956 void LCodeGen::EmitBranch(InstrType instr, Condition cc) {
1958 int left_block = instr->TrueDestination(chunk_); 1957 int left_block = instr->TrueDestination(chunk_);
1959 int right_block = instr->FalseDestination(chunk_); 1958 int right_block = instr->FalseDestination(chunk_);
1960 1959
1961 int next_block = GetNextEmittedBlock(); 1960 int next_block = GetNextEmittedBlock();
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
2522 EmitFalseBranch(instr, equal); 2521 EmitFalseBranch(instr, equal);
2523 __ movp(object_map, FieldOperand(object_prototype, HeapObject::kMapOffset)); 2522 __ movp(object_map, FieldOperand(object_prototype, HeapObject::kMapOffset));
2524 __ jmp(&loop); 2523 __ jmp(&loop);
2525 } 2524 }
2526 2525
2527 2526
2528 void LCodeGen::DoCmpT(LCmpT* instr) { 2527 void LCodeGen::DoCmpT(LCmpT* instr) {
2529 DCHECK(ToRegister(instr->context()).is(rsi)); 2528 DCHECK(ToRegister(instr->context()).is(rsi));
2530 Token::Value op = instr->op(); 2529 Token::Value op = instr->op();
2531 2530
2532 Handle<Code> ic = 2531 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code();
2533 CodeFactory::CompareIC(isolate(), op, instr->strength()).code();
2534 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2532 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2535 2533
2536 Condition condition = TokenToCondition(op, false); 2534 Condition condition = TokenToCondition(op, false);
2537 Label true_value, done; 2535 Label true_value, done;
2538 __ testp(rax, rax); 2536 __ testp(rax, rax);
2539 __ j(condition, &true_value, Label::kNear); 2537 __ j(condition, &true_value, Label::kNear);
2540 __ LoadRoot(ToRegister(instr->result()), Heap::kFalseValueRootIndex); 2538 __ LoadRoot(ToRegister(instr->result()), Heap::kFalseValueRootIndex);
2541 __ jmp(&done, Label::kNear); 2539 __ jmp(&done, Label::kNear);
2542 __ bind(&true_value); 2540 __ bind(&true_value);
2543 __ LoadRoot(ToRegister(instr->result()), Heap::kTrueValueRootIndex); 2541 __ LoadRoot(ToRegister(instr->result()), Heap::kTrueValueRootIndex);
(...skipping 3072 matching lines...) Expand 10 before | Expand all | Expand 10 after
5616 RecordSafepoint(Safepoint::kNoLazyDeopt); 5614 RecordSafepoint(Safepoint::kNoLazyDeopt);
5617 } 5615 }
5618 5616
5619 5617
5620 #undef __ 5618 #undef __
5621 5619
5622 } // namespace internal 5620 } // namespace internal
5623 } // namespace v8 5621 } // namespace v8
5624 5622
5625 #endif // V8_TARGET_ARCH_X64 5623 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698