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

Side by Side Diff: src/full-codegen/ppc/full-codegen-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/debug/debug.h" 10 #include "src/debug/debug.h"
(...skipping 4939 matching lines...) Expand 10 before | Expand all | Expand 10 after
4950 if (expr->op() == Token::EQ_STRICT) { 4950 if (expr->op() == Token::EQ_STRICT) {
4951 Heap::RootListIndex nil_value = nil == kNullValue 4951 Heap::RootListIndex nil_value = nil == kNullValue
4952 ? Heap::kNullValueRootIndex 4952 ? Heap::kNullValueRootIndex
4953 : Heap::kUndefinedValueRootIndex; 4953 : Heap::kUndefinedValueRootIndex;
4954 __ LoadRoot(r4, nil_value); 4954 __ LoadRoot(r4, nil_value);
4955 __ cmp(r3, r4); 4955 __ cmp(r3, r4);
4956 Split(eq, if_true, if_false, fall_through); 4956 Split(eq, if_true, if_false, fall_through);
4957 } else { 4957 } else {
4958 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil); 4958 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil);
4959 CallIC(ic, expr->CompareOperationFeedbackId()); 4959 CallIC(ic, expr->CompareOperationFeedbackId());
4960 __ cmpi(r3, Operand::Zero()); 4960 __ CompareRoot(r3, Heap::kTrueValueRootIndex);
4961 Split(ne, if_true, if_false, fall_through); 4961 Split(eq, if_true, if_false, fall_through);
4962 } 4962 }
4963 context()->Plug(if_true, if_false); 4963 context()->Plug(if_true, if_false);
4964 } 4964 }
4965 4965
4966 4966
4967 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { 4967 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) {
4968 __ LoadP(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 4968 __ LoadP(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
4969 context()->Plug(r3); 4969 context()->Plug(r3);
4970 } 4970 }
4971 4971
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
5142 return ON_STACK_REPLACEMENT; 5142 return ON_STACK_REPLACEMENT;
5143 } 5143 }
5144 5144
5145 DCHECK(interrupt_address == 5145 DCHECK(interrupt_address ==
5146 isolate->builtins()->OsrAfterStackCheck()->entry()); 5146 isolate->builtins()->OsrAfterStackCheck()->entry());
5147 return OSR_AFTER_STACK_CHECK; 5147 return OSR_AFTER_STACK_CHECK;
5148 } 5148 }
5149 } // namespace internal 5149 } // namespace internal
5150 } // namespace v8 5150 } // namespace v8
5151 #endif // V8_TARGET_ARCH_PPC 5151 #endif // V8_TARGET_ARCH_PPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698