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 3920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3931 | 3931 |
3932 VisitForAccumulatorValue(sub_expr); | 3932 VisitForAccumulatorValue(sub_expr); |
3933 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3933 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
3934 if (expr->op() == Token::EQ_STRICT) { | 3934 if (expr->op() == Token::EQ_STRICT) { |
3935 Heap::RootListIndex nil_value = nil == kNullValue ? | 3935 Heap::RootListIndex nil_value = nil == kNullValue ? |
3936 Heap::kNullValueRootIndex : | 3936 Heap::kNullValueRootIndex : |
3937 Heap::kUndefinedValueRootIndex; | 3937 Heap::kUndefinedValueRootIndex; |
3938 __ CompareRoot(rax, nil_value); | 3938 __ CompareRoot(rax, nil_value); |
3939 Split(equal, if_true, if_false, fall_through); | 3939 Split(equal, if_true, if_false, fall_through); |
3940 } else { | 3940 } else { |
3941 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil); | 3941 __ JumpIfSmi(rax, if_false); |
3942 CallIC(ic, expr->CompareOperationFeedbackId()); | 3942 __ movp(rax, FieldOperand(rax, HeapObject::kMapOffset)); |
3943 __ CompareRoot(rax, Heap::kTrueValueRootIndex); | 3943 __ testb(FieldOperand(rax, Map::kBitFieldOffset), |
3944 Split(equal, if_true, if_false, fall_through); | 3944 Immediate(1 << Map::kIsUndetectable)); |
| 3945 Split(not_zero, if_true, if_false, fall_through); |
3945 } | 3946 } |
3946 context()->Plug(if_true, if_false); | 3947 context()->Plug(if_true, if_false); |
3947 } | 3948 } |
3948 | 3949 |
3949 | 3950 |
3950 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { | 3951 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { |
3951 __ movp(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 3952 __ movp(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
3952 context()->Plug(rax); | 3953 context()->Plug(rax); |
3953 } | 3954 } |
3954 | 3955 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4138 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4139 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
4139 Assembler::target_address_at(call_target_address, | 4140 Assembler::target_address_at(call_target_address, |
4140 unoptimized_code)); | 4141 unoptimized_code)); |
4141 return OSR_AFTER_STACK_CHECK; | 4142 return OSR_AFTER_STACK_CHECK; |
4142 } | 4143 } |
4143 | 4144 |
4144 } // namespace internal | 4145 } // namespace internal |
4145 } // namespace v8 | 4146 } // namespace v8 |
4146 | 4147 |
4147 #endif // V8_TARGET_ARCH_X64 | 4148 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |