| OLD | NEW |
| 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_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 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 3901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3912 | 3912 |
| 3913 VisitForAccumulatorValue(sub_expr); | 3913 VisitForAccumulatorValue(sub_expr); |
| 3914 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3914 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 3915 if (expr->op() == Token::EQ_STRICT) { | 3915 if (expr->op() == Token::EQ_STRICT) { |
| 3916 Heap::RootListIndex nil_value = nil == kNullValue ? | 3916 Heap::RootListIndex nil_value = nil == kNullValue ? |
| 3917 Heap::kNullValueRootIndex : | 3917 Heap::kNullValueRootIndex : |
| 3918 Heap::kUndefinedValueRootIndex; | 3918 Heap::kUndefinedValueRootIndex; |
| 3919 __ CompareRoot(rax, nil_value); | 3919 __ CompareRoot(rax, nil_value); |
| 3920 Split(equal, if_true, if_false, fall_through); | 3920 Split(equal, if_true, if_false, fall_through); |
| 3921 } else { | 3921 } else { |
| 3922 __ JumpIfSmi(rax, if_false); | 3922 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil); |
| 3923 __ movp(rax, FieldOperand(rax, HeapObject::kMapOffset)); | 3923 CallIC(ic, expr->CompareOperationFeedbackId()); |
| 3924 __ testb(FieldOperand(rax, Map::kBitFieldOffset), | 3924 __ CompareRoot(rax, Heap::kTrueValueRootIndex); |
| 3925 Immediate(1 << Map::kIsUndetectable)); | 3925 Split(equal, if_true, if_false, fall_through); |
| 3926 Split(not_zero, if_true, if_false, fall_through); | |
| 3927 } | 3926 } |
| 3928 context()->Plug(if_true, if_false); | 3927 context()->Plug(if_true, if_false); |
| 3929 } | 3928 } |
| 3930 | 3929 |
| 3931 | 3930 |
| 3932 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { | 3931 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { |
| 3933 __ movp(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 3932 __ movp(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
| 3934 context()->Plug(rax); | 3933 context()->Plug(rax); |
| 3935 } | 3934 } |
| 3936 | 3935 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4120 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4119 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 4121 Assembler::target_address_at(call_target_address, | 4120 Assembler::target_address_at(call_target_address, |
| 4122 unoptimized_code)); | 4121 unoptimized_code)); |
| 4123 return OSR_AFTER_STACK_CHECK; | 4122 return OSR_AFTER_STACK_CHECK; |
| 4124 } | 4123 } |
| 4125 | 4124 |
| 4126 } // namespace internal | 4125 } // namespace internal |
| 4127 } // namespace v8 | 4126 } // namespace v8 |
| 4128 | 4127 |
| 4129 #endif // V8_TARGET_ARCH_X64 | 4128 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |