| 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 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2110 __ j(equal, &miss); | 2110 __ j(equal, &miss); |
| 2111 | 2111 |
| 2112 if (!FLAG_trace_ic) { | 2112 if (!FLAG_trace_ic) { |
| 2113 // We are going megamorphic. If the feedback is a JSFunction, it is fine | 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. | 2114 // to handle it here. More complex cases are dealt with in the runtime. |
| 2115 __ AssertNotSmi(rcx); | 2115 __ AssertNotSmi(rcx); |
| 2116 __ CmpObjectType(rcx, JS_FUNCTION_TYPE, rcx); | 2116 __ CmpObjectType(rcx, JS_FUNCTION_TYPE, rcx); |
| 2117 __ j(not_equal, &miss); | 2117 __ j(not_equal, &miss); |
| 2118 __ Move(FieldOperand(rbx, rdx, times_pointer_size, FixedArray::kHeaderSize), | 2118 __ Move(FieldOperand(rbx, rdx, times_pointer_size, FixedArray::kHeaderSize), |
| 2119 TypeFeedbackVector::MegamorphicSentinel(isolate)); | 2119 TypeFeedbackVector::MegamorphicSentinel(isolate)); |
| 2120 // We have to update statistics for runtime profiling. |
| 2121 const int with_types_offset = |
| 2122 FixedArray::OffsetOfElementAt(TypeFeedbackVector::kWithTypesIndex); |
| 2123 __ SmiAddConstant(FieldOperand(rbx, with_types_offset), Smi::FromInt(-1)); |
| 2124 const int generic_offset = |
| 2125 FixedArray::OffsetOfElementAt(TypeFeedbackVector::kGenericCountIndex); |
| 2126 __ SmiAddConstant(FieldOperand(rbx, generic_offset), Smi::FromInt(1)); |
| 2120 __ jmp(&slow_start); | 2127 __ jmp(&slow_start); |
| 2121 } | 2128 } |
| 2122 | 2129 |
| 2123 // We are here because tracing is on or we are going monomorphic. | 2130 // We are here because tracing is on or we are going monomorphic. |
| 2124 __ bind(&miss); | 2131 __ bind(&miss); |
| 2125 GenerateMiss(masm); | 2132 GenerateMiss(masm); |
| 2126 | 2133 |
| 2127 // the slow case | 2134 // the slow case |
| 2128 __ bind(&slow_start); | 2135 __ bind(&slow_start); |
| 2129 // Check that function is not a smi. | 2136 // Check that function is not a smi. |
| (...skipping 2539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4669 return_value_operand, | 4676 return_value_operand, |
| 4670 NULL); | 4677 NULL); |
| 4671 } | 4678 } |
| 4672 | 4679 |
| 4673 | 4680 |
| 4674 #undef __ | 4681 #undef __ |
| 4675 | 4682 |
| 4676 } } // namespace v8::internal | 4683 } } // namespace v8::internal |
| 4677 | 4684 |
| 4678 #endif // V8_TARGET_ARCH_X64 | 4685 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |