OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
(...skipping 1984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1995 // convincing us that we have a monomorphic JSFunction. | 1995 // convincing us that we have a monomorphic JSFunction. |
1996 __ JumpIfSmi(rdi, &extra_checks_or_miss); | 1996 __ JumpIfSmi(rdi, &extra_checks_or_miss); |
1997 | 1997 |
1998 // Increment the call count for monomorphic function calls. | 1998 // Increment the call count for monomorphic function calls. |
1999 __ SmiAddConstant(FieldOperand(rbx, rdx, times_pointer_size, | 1999 __ SmiAddConstant(FieldOperand(rbx, rdx, times_pointer_size, |
2000 FixedArray::kHeaderSize + kPointerSize), | 2000 FixedArray::kHeaderSize + kPointerSize), |
2001 Smi::FromInt(CallICNexus::kCallCountIncrement)); | 2001 Smi::FromInt(CallICNexus::kCallCountIncrement)); |
2002 | 2002 |
2003 __ bind(&call_function); | 2003 __ bind(&call_function); |
2004 __ Set(rax, argc); | 2004 __ Set(rax, argc); |
2005 __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode()), | 2005 Handle<Code> call_function_builtin = |
2006 RelocInfo::CODE_TARGET); | 2006 tail_call_mode() == TailCallMode::kDisallow |
| 2007 ? masm->isolate()->builtins()->CallFunction(convert_mode()) |
| 2008 : masm->isolate()->builtins()->TailCallFunction(convert_mode()); |
| 2009 __ Jump(call_function_builtin, RelocInfo::CODE_TARGET); |
2007 | 2010 |
2008 __ bind(&extra_checks_or_miss); | 2011 __ bind(&extra_checks_or_miss); |
2009 Label uninitialized, miss, not_allocation_site; | 2012 Label uninitialized, miss, not_allocation_site; |
2010 | 2013 |
2011 __ Cmp(rcx, TypeFeedbackVector::MegamorphicSentinel(isolate)); | 2014 __ Cmp(rcx, TypeFeedbackVector::MegamorphicSentinel(isolate)); |
2012 __ j(equal, &call); | 2015 __ j(equal, &call); |
2013 | 2016 |
2014 // Check if we have an allocation site. | 2017 // Check if we have an allocation site. |
2015 __ CompareRoot(FieldOperand(rcx, HeapObject::kMapOffset), | 2018 __ CompareRoot(FieldOperand(rcx, HeapObject::kMapOffset), |
2016 Heap::kAllocationSiteMapRootIndex); | 2019 Heap::kAllocationSiteMapRootIndex); |
(...skipping 3406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5423 kStackSpace, nullptr, return_value_operand, NULL); | 5426 kStackSpace, nullptr, return_value_operand, NULL); |
5424 } | 5427 } |
5425 | 5428 |
5426 | 5429 |
5427 #undef __ | 5430 #undef __ |
5428 | 5431 |
5429 } // namespace internal | 5432 } // namespace internal |
5430 } // namespace v8 | 5433 } // namespace v8 |
5431 | 5434 |
5432 #endif // V8_TARGET_ARCH_X64 | 5435 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |