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

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

Issue 1731383003: X87: [compiler] Drop the CompareNilIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « no previous file | src/x87/interface-descriptors-x87.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_X87 5 #if V8_TARGET_ARCH_X87
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 3869 matching lines...) Expand 10 before | Expand all | Expand 10 after
3880 VisitForAccumulatorValue(sub_expr); 3880 VisitForAccumulatorValue(sub_expr);
3881 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3881 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3882 3882
3883 Handle<Object> nil_value = nil == kNullValue 3883 Handle<Object> nil_value = nil == kNullValue
3884 ? isolate()->factory()->null_value() 3884 ? isolate()->factory()->null_value()
3885 : isolate()->factory()->undefined_value(); 3885 : isolate()->factory()->undefined_value();
3886 if (expr->op() == Token::EQ_STRICT) { 3886 if (expr->op() == Token::EQ_STRICT) {
3887 __ cmp(eax, nil_value); 3887 __ cmp(eax, nil_value);
3888 Split(equal, if_true, if_false, fall_through); 3888 Split(equal, if_true, if_false, fall_through);
3889 } else { 3889 } else {
3890 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil); 3890 __ JumpIfSmi(eax, if_false);
3891 CallIC(ic, expr->CompareOperationFeedbackId()); 3891 __ mov(eax, FieldOperand(eax, HeapObject::kMapOffset));
3892 __ cmp(eax, isolate()->factory()->true_value()); 3892 __ test_b(FieldOperand(eax, Map::kBitFieldOffset),
3893 Split(equal, if_true, if_false, fall_through); 3893 1 << Map::kIsUndetectable);
3894 Split(not_zero, if_true, if_false, fall_through);
3894 } 3895 }
3895 context()->Plug(if_true, if_false); 3896 context()->Plug(if_true, if_false);
3896 } 3897 }
3897 3898
3898 3899
3899 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { 3900 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) {
3900 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 3901 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
3901 context()->Plug(eax); 3902 context()->Plug(eax);
3902 } 3903 }
3903 3904
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
4087 Assembler::target_address_at(call_target_address, 4088 Assembler::target_address_at(call_target_address,
4088 unoptimized_code)); 4089 unoptimized_code));
4089 return OSR_AFTER_STACK_CHECK; 4090 return OSR_AFTER_STACK_CHECK;
4090 } 4091 }
4091 4092
4092 4093
4093 } // namespace internal 4094 } // namespace internal
4094 } // namespace v8 4095 } // namespace v8
4095 4096
4096 #endif // V8_TARGET_ARCH_X87 4097 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | src/x87/interface-descriptors-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698