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

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.cc

Issue 1417503008: [turbofan] Use CompareNilIC for abstract equality with null/undefined. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 #if V8_TARGET_ARCH_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 4941 matching lines...) Expand 10 before | Expand all | Expand 10 after
4952 __ mov(a0, result_register()); 4952 __ mov(a0, result_register());
4953 if (expr->op() == Token::EQ_STRICT) { 4953 if (expr->op() == Token::EQ_STRICT) {
4954 Heap::RootListIndex nil_value = nil == kNullValue ? 4954 Heap::RootListIndex nil_value = nil == kNullValue ?
4955 Heap::kNullValueRootIndex : 4955 Heap::kNullValueRootIndex :
4956 Heap::kUndefinedValueRootIndex; 4956 Heap::kUndefinedValueRootIndex;
4957 __ LoadRoot(a1, nil_value); 4957 __ LoadRoot(a1, nil_value);
4958 Split(eq, a0, Operand(a1), if_true, if_false, fall_through); 4958 Split(eq, a0, Operand(a1), if_true, if_false, fall_through);
4959 } else { 4959 } else {
4960 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil); 4960 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil);
4961 CallIC(ic, expr->CompareOperationFeedbackId()); 4961 CallIC(ic, expr->CompareOperationFeedbackId());
4962 Split(ne, v0, Operand(zero_reg), if_true, if_false, fall_through); 4962 __ LoadRoot(a1, Heap::kTrueValueRootIndex);
4963 Split(eq, v0, Operand(a1), if_true, if_false, fall_through);
4963 } 4964 }
4964 context()->Plug(if_true, if_false); 4965 context()->Plug(if_true, if_false);
4965 } 4966 }
4966 4967
4967 4968
4968 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { 4969 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) {
4969 __ ld(v0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 4970 __ ld(v0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
4970 context()->Plug(v0); 4971 context()->Plug(v0);
4971 } 4972 }
4972 4973
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
5159 reinterpret_cast<uint64_t>( 5160 reinterpret_cast<uint64_t>(
5160 isolate->builtins()->OsrAfterStackCheck()->entry())); 5161 isolate->builtins()->OsrAfterStackCheck()->entry()));
5161 return OSR_AFTER_STACK_CHECK; 5162 return OSR_AFTER_STACK_CHECK;
5162 } 5163 }
5163 5164
5164 5165
5165 } // namespace internal 5166 } // namespace internal
5166 } // namespace v8 5167 } // namespace v8
5167 5168
5168 #endif // V8_TARGET_ARCH_MIPS64 5169 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698