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

Side by Side Diff: src/full-codegen/ia32/full-codegen-ia32.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_IA32 5 #if V8_TARGET_ARCH_IA32
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 4849 matching lines...) Expand 10 before | Expand all | Expand 10 after
4860 4860
4861 Handle<Object> nil_value = nil == kNullValue 4861 Handle<Object> nil_value = nil == kNullValue
4862 ? isolate()->factory()->null_value() 4862 ? isolate()->factory()->null_value()
4863 : isolate()->factory()->undefined_value(); 4863 : isolate()->factory()->undefined_value();
4864 if (expr->op() == Token::EQ_STRICT) { 4864 if (expr->op() == Token::EQ_STRICT) {
4865 __ cmp(eax, nil_value); 4865 __ cmp(eax, nil_value);
4866 Split(equal, if_true, if_false, fall_through); 4866 Split(equal, if_true, if_false, fall_through);
4867 } else { 4867 } else {
4868 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil); 4868 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil);
4869 CallIC(ic, expr->CompareOperationFeedbackId()); 4869 CallIC(ic, expr->CompareOperationFeedbackId());
4870 __ test(eax, eax); 4870 __ cmp(eax, isolate()->factory()->true_value());
4871 Split(not_zero, if_true, if_false, fall_through); 4871 Split(equal, if_true, if_false, fall_through);
4872 } 4872 }
4873 context()->Plug(if_true, if_false); 4873 context()->Plug(if_true, if_false);
4874 } 4874 }
4875 4875
4876 4876
4877 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { 4877 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) {
4878 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 4878 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
4879 context()->Plug(eax); 4879 context()->Plug(eax);
4880 } 4880 }
4881 4881
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
5060 Assembler::target_address_at(call_target_address, 5060 Assembler::target_address_at(call_target_address,
5061 unoptimized_code)); 5061 unoptimized_code));
5062 return OSR_AFTER_STACK_CHECK; 5062 return OSR_AFTER_STACK_CHECK;
5063 } 5063 }
5064 5064
5065 5065
5066 } // namespace internal 5066 } // namespace internal
5067 } // namespace v8 5067 } // namespace v8
5068 5068
5069 #endif // V8_TARGET_ARCH_IA32 5069 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698