| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 2091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2102 __ bind(&extra_checks_or_miss); | 2102 __ bind(&extra_checks_or_miss); |
| 2103 Label miss; | 2103 Label miss; |
| 2104 | 2104 |
| 2105 __ movp(rcx, FieldOperand(rbx, rdx, times_pointer_size, | 2105 __ movp(rcx, FieldOperand(rbx, rdx, times_pointer_size, |
| 2106 FixedArray::kHeaderSize)); | 2106 FixedArray::kHeaderSize)); |
| 2107 __ Cmp(rcx, TypeFeedbackVector::MegamorphicSentinel(isolate)); | 2107 __ Cmp(rcx, TypeFeedbackVector::MegamorphicSentinel(isolate)); |
| 2108 __ j(equal, &slow_start); | 2108 __ j(equal, &slow_start); |
| 2109 __ Cmp(rcx, TypeFeedbackVector::UninitializedSentinel(isolate)); | 2109 __ Cmp(rcx, TypeFeedbackVector::UninitializedSentinel(isolate)); |
| 2110 __ j(equal, &miss); | 2110 __ j(equal, &miss); |
| 2111 | 2111 |
| 2112 if (!FLAG_trace_ic) { | |
| 2113 // We are going megamorphic. If the feedback is a JSFunction, it is fine | |
| 2114 // to handle it here. More complex cases are dealt with in the runtime. | |
| 2115 __ AssertNotSmi(rcx); | |
| 2116 __ CmpObjectType(rcx, JS_FUNCTION_TYPE, rcx); | |
| 2117 __ j(not_equal, &miss); | |
| 2118 __ Move(FieldOperand(rbx, rdx, times_pointer_size, FixedArray::kHeaderSize), | |
| 2119 TypeFeedbackVector::MegamorphicSentinel(isolate)); | |
| 2120 __ jmp(&slow_start); | |
| 2121 } | |
| 2122 | |
| 2123 // We are here because tracing is on or we are going monomorphic. | 2112 // We are here because tracing is on or we are going monomorphic. |
| 2124 __ bind(&miss); | 2113 __ bind(&miss); |
| 2125 GenerateMiss(masm); | 2114 GenerateMiss(masm); |
| 2126 | 2115 |
| 2127 // the slow case | 2116 // the slow case |
| 2128 __ bind(&slow_start); | 2117 __ bind(&slow_start); |
| 2129 // Check that function is not a smi. | 2118 // Check that function is not a smi. |
| 2130 __ JumpIfSmi(rdi, &non_function); | 2119 __ JumpIfSmi(rdi, &non_function); |
| 2131 // Check that function is a JSFunction. | 2120 // Check that function is a JSFunction. |
| 2132 __ CmpObjectType(rdi, JS_FUNCTION_TYPE, rcx); | 2121 __ CmpObjectType(rdi, JS_FUNCTION_TYPE, rcx); |
| (...skipping 2536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4669 return_value_operand, | 4658 return_value_operand, |
| 4670 NULL); | 4659 NULL); |
| 4671 } | 4660 } |
| 4672 | 4661 |
| 4673 | 4662 |
| 4674 #undef __ | 4663 #undef __ |
| 4675 | 4664 |
| 4676 } } // namespace v8::internal | 4665 } } // namespace v8::internal |
| 4677 | 4666 |
| 4678 #endif // V8_TARGET_ARCH_X64 | 4667 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |