| 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 3860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3871 | 3871 |
| 3872 VisitForAccumulatorValue(sub_expr); | 3872 VisitForAccumulatorValue(sub_expr); |
| 3873 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3873 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 3874 if (expr->op() == Token::EQ_STRICT) { | 3874 if (expr->op() == Token::EQ_STRICT) { |
| 3875 Heap::RootListIndex nil_value = nil == kNullValue ? | 3875 Heap::RootListIndex nil_value = nil == kNullValue ? |
| 3876 Heap::kNullValueRootIndex : | 3876 Heap::kNullValueRootIndex : |
| 3877 Heap::kUndefinedValueRootIndex; | 3877 Heap::kUndefinedValueRootIndex; |
| 3878 __ CompareRoot(rax, nil_value); | 3878 __ CompareRoot(rax, nil_value); |
| 3879 Split(equal, if_true, if_false, fall_through); | 3879 Split(equal, if_true, if_false, fall_through); |
| 3880 } else { | 3880 } else { |
| 3881 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil); | 3881 __ JumpIfSmi(rax, if_false); |
| 3882 CallIC(ic, expr->CompareOperationFeedbackId()); | 3882 __ movp(rax, FieldOperand(rax, HeapObject::kMapOffset)); |
| 3883 __ CompareRoot(rax, Heap::kTrueValueRootIndex); | 3883 __ testb(FieldOperand(rax, Map::kBitFieldOffset), |
| 3884 Split(equal, if_true, if_false, fall_through); | 3884 Immediate(1 << Map::kIsUndetectable)); |
| 3885 Split(not_zero, if_true, if_false, fall_through); |
| 3885 } | 3886 } |
| 3886 context()->Plug(if_true, if_false); | 3887 context()->Plug(if_true, if_false); |
| 3887 } | 3888 } |
| 3888 | 3889 |
| 3889 | 3890 |
| 3890 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { | 3891 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { |
| 3891 __ movp(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 3892 __ movp(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
| 3892 context()->Plug(rax); | 3893 context()->Plug(rax); |
| 3893 } | 3894 } |
| 3894 | 3895 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4078 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4079 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 4079 Assembler::target_address_at(call_target_address, | 4080 Assembler::target_address_at(call_target_address, |
| 4080 unoptimized_code)); | 4081 unoptimized_code)); |
| 4081 return OSR_AFTER_STACK_CHECK; | 4082 return OSR_AFTER_STACK_CHECK; |
| 4082 } | 4083 } |
| 4083 | 4084 |
| 4084 } // namespace internal | 4085 } // namespace internal |
| 4085 } // namespace v8 | 4086 } // namespace v8 |
| 4086 | 4087 |
| 4087 #endif // V8_TARGET_ARCH_X64 | 4088 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |