| 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 2127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2138 __ j(equal, &miss); | 2138 __ j(equal, &miss); |
| 2139 | 2139 |
| 2140 if (!FLAG_trace_ic) { | 2140 if (!FLAG_trace_ic) { |
| 2141 // We are going megamorphic. If the feedback is a JSFunction, it is fine | 2141 // We are going megamorphic. If the feedback is a JSFunction, it is fine |
| 2142 // to handle it here. More complex cases are dealt with in the runtime. | 2142 // to handle it here. More complex cases are dealt with in the runtime. |
| 2143 __ AssertNotSmi(rcx); | 2143 __ AssertNotSmi(rcx); |
| 2144 __ CmpObjectType(rcx, JS_FUNCTION_TYPE, rcx); | 2144 __ CmpObjectType(rcx, JS_FUNCTION_TYPE, rcx); |
| 2145 __ j(not_equal, &miss); | 2145 __ j(not_equal, &miss); |
| 2146 __ Move(FieldOperand(rbx, rdx, times_pointer_size, FixedArray::kHeaderSize), | 2146 __ Move(FieldOperand(rbx, rdx, times_pointer_size, FixedArray::kHeaderSize), |
| 2147 TypeFeedbackVector::MegamorphicSentinel(isolate)); | 2147 TypeFeedbackVector::MegamorphicSentinel(isolate)); |
| 2148 // We have to update statistics for runtime profiling. |
| 2149 const int with_types_offset = |
| 2150 FixedArray::OffsetOfElementAt(TypeFeedbackVector::kWithTypesIndex); |
| 2151 __ SmiAddConstant(FieldOperand(rbx, with_types_offset), Smi::FromInt(-1)); |
| 2152 const int generic_offset = |
| 2153 FixedArray::OffsetOfElementAt(TypeFeedbackVector::kGenericCountIndex); |
| 2154 __ SmiAddConstant(FieldOperand(rbx, generic_offset), Smi::FromInt(1)); |
| 2148 __ jmp(&slow_start); | 2155 __ jmp(&slow_start); |
| 2149 } | 2156 } |
| 2150 | 2157 |
| 2151 // We are here because tracing is on or we are going monomorphic. | 2158 // We are here because tracing is on or we are going monomorphic. |
| 2152 __ bind(&miss); | 2159 __ bind(&miss); |
| 2153 GenerateMiss(masm); | 2160 GenerateMiss(masm); |
| 2154 | 2161 |
| 2155 // the slow case | 2162 // the slow case |
| 2156 __ bind(&slow_start); | 2163 __ bind(&slow_start); |
| 2157 // Check that function is not a smi. | 2164 // Check that function is not a smi. |
| (...skipping 2542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4700 return_value_operand, | 4707 return_value_operand, |
| 4701 NULL); | 4708 NULL); |
| 4702 } | 4709 } |
| 4703 | 4710 |
| 4704 | 4711 |
| 4705 #undef __ | 4712 #undef __ |
| 4706 | 4713 |
| 4707 } } // namespace v8::internal | 4714 } } // namespace v8::internal |
| 4708 | 4715 |
| 4709 #endif // V8_TARGET_ARCH_X64 | 4716 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |