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

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

Issue 1722193002: [compiler] Drop the CompareNilIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE Created 4 years, 9 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 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/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 3874 matching lines...) Expand 10 before | Expand all | Expand 10 after
3885 VisitForAccumulatorValue(sub_expr); 3885 VisitForAccumulatorValue(sub_expr);
3886 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3886 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3887 3887
3888 Handle<Object> nil_value = nil == kNullValue 3888 Handle<Object> nil_value = nil == kNullValue
3889 ? isolate()->factory()->null_value() 3889 ? isolate()->factory()->null_value()
3890 : isolate()->factory()->undefined_value(); 3890 : isolate()->factory()->undefined_value();
3891 if (expr->op() == Token::EQ_STRICT) { 3891 if (expr->op() == Token::EQ_STRICT) {
3892 __ cmp(eax, nil_value); 3892 __ cmp(eax, nil_value);
3893 Split(equal, if_true, if_false, fall_through); 3893 Split(equal, if_true, if_false, fall_through);
3894 } else { 3894 } else {
3895 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil); 3895 __ JumpIfSmi(eax, if_false);
3896 CallIC(ic, expr->CompareOperationFeedbackId()); 3896 __ mov(eax, FieldOperand(eax, HeapObject::kMapOffset));
3897 __ cmp(eax, isolate()->factory()->true_value()); 3897 __ test_b(FieldOperand(eax, Map::kBitFieldOffset),
3898 Split(equal, if_true, if_false, fall_through); 3898 1 << Map::kIsUndetectable);
3899 Split(not_zero, if_true, if_false, fall_through);
3899 } 3900 }
3900 context()->Plug(if_true, if_false); 3901 context()->Plug(if_true, if_false);
3901 } 3902 }
3902 3903
3903 3904
3904 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { 3905 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) {
3905 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 3906 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
3906 context()->Plug(eax); 3907 context()->Plug(eax);
3907 } 3908 }
3908 3909
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
4092 Assembler::target_address_at(call_target_address, 4093 Assembler::target_address_at(call_target_address,
4093 unoptimized_code)); 4094 unoptimized_code));
4094 return OSR_AFTER_STACK_CHECK; 4095 return OSR_AFTER_STACK_CHECK;
4095 } 4096 }
4096 4097
4097 4098
4098 } // namespace internal 4099 } // namespace internal
4099 } // namespace v8 4100 } // namespace v8
4100 4101
4101 #endif // V8_TARGET_ARCH_IA32 4102 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698