| 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 #include "src/ic/ic.h" | 5 #include "src/ic/ic.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 1742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1753 } | 1753 } |
| 1754 NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder); | 1754 NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder); |
| 1755 return compiler.CompileStoreCallback(receiver, lookup->name(), info); | 1755 return compiler.CompileStoreCallback(receiver, lookup->name(), info); |
| 1756 } else if (accessors->IsAccessorPair()) { | 1756 } else if (accessors->IsAccessorPair()) { |
| 1757 Handle<Object> setter(Handle<AccessorPair>::cast(accessors)->setter(), | 1757 Handle<Object> setter(Handle<AccessorPair>::cast(accessors)->setter(), |
| 1758 isolate()); | 1758 isolate()); |
| 1759 if (!setter->IsJSFunction()) { | 1759 if (!setter->IsJSFunction()) { |
| 1760 TRACE_GENERIC_IC(isolate(), "StoreIC", "setter not a function"); | 1760 TRACE_GENERIC_IC(isolate(), "StoreIC", "setter not a function"); |
| 1761 break; | 1761 break; |
| 1762 } | 1762 } |
| 1763 // When debugging we need to go the slow path to flood the accessor. | |
| 1764 if (GetSharedFunctionInfo()->HasDebugInfo()) break; | |
| 1765 Handle<JSFunction> function = Handle<JSFunction>::cast(setter); | 1763 Handle<JSFunction> function = Handle<JSFunction>::cast(setter); |
| 1766 CallOptimization call_optimization(function); | 1764 CallOptimization call_optimization(function); |
| 1767 NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder); | 1765 NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder); |
| 1768 if (call_optimization.is_simple_api_call() && | 1766 if (call_optimization.is_simple_api_call() && |
| 1769 call_optimization.IsCompatibleReceiver(receiver, holder)) { | 1767 call_optimization.IsCompatibleReceiver(receiver, holder)) { |
| 1770 return compiler.CompileStoreCallback(receiver, lookup->name(), | 1768 return compiler.CompileStoreCallback(receiver, lookup->name(), |
| 1771 call_optimization, | 1769 call_optimization, |
| 1772 lookup->GetAccessorIndex()); | 1770 lookup->GetAccessorIndex()); |
| 1773 } | 1771 } |
| 1774 int expected_arguments = | 1772 int expected_arguments = |
| (...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2978 KeyedLoadICNexus nexus(vector, vector_slot); | 2976 KeyedLoadICNexus nexus(vector, vector_slot); |
| 2979 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); | 2977 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); |
| 2980 ic.UpdateState(receiver, key); | 2978 ic.UpdateState(receiver, key); |
| 2981 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); | 2979 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); |
| 2982 } | 2980 } |
| 2983 | 2981 |
| 2984 return *result; | 2982 return *result; |
| 2985 } | 2983 } |
| 2986 } // namespace internal | 2984 } // namespace internal |
| 2987 } // namespace v8 | 2985 } // namespace v8 |
| OLD | NEW |