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/api-arguments.h" | 9 #include "src/api-arguments.h" |
10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
11 #include "src/base/bits.h" | 11 #include "src/base/bits.h" |
| 12 #include "src/code-factory.h" |
12 #include "src/codegen.h" | 13 #include "src/codegen.h" |
13 #include "src/conversions.h" | 14 #include "src/conversions.h" |
14 #include "src/execution.h" | 15 #include "src/execution.h" |
15 #include "src/field-type.h" | 16 #include "src/field-type.h" |
16 #include "src/frames-inl.h" | 17 #include "src/frames-inl.h" |
17 #include "src/ic/call-optimization.h" | 18 #include "src/ic/call-optimization.h" |
18 #include "src/ic/handler-compiler.h" | 19 #include "src/ic/handler-compiler.h" |
19 #include "src/ic/ic-inl.h" | 20 #include "src/ic/ic-inl.h" |
20 #include "src/ic/ic-compiler.h" | 21 #include "src/ic/ic-compiler.h" |
21 #include "src/ic/stub-cache.h" | 22 #include "src/ic/stub-cache.h" |
(...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1714 break; | 1715 break; |
1715 } | 1716 } |
1716 | 1717 |
1717 DCHECK(lookup->IsCacheableTransition()); | 1718 DCHECK(lookup->IsCacheableTransition()); |
1718 NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder); | 1719 NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder); |
1719 return compiler.CompileStoreTransition(transition, lookup->name()); | 1720 return compiler.CompileStoreTransition(transition, lookup->name()); |
1720 } | 1721 } |
1721 | 1722 |
1722 case LookupIterator::INTERCEPTOR: { | 1723 case LookupIterator::INTERCEPTOR: { |
1723 DCHECK(!holder->GetNamedInterceptor()->setter()->IsUndefined()); | 1724 DCHECK(!holder->GetNamedInterceptor()->setter()->IsUndefined()); |
1724 NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder); | 1725 return CodeFactory::StoreInterceptor(isolate()).code(); |
1725 return compiler.CompileStoreInterceptor(lookup->name()); | |
1726 } | 1726 } |
1727 | 1727 |
1728 case LookupIterator::ACCESSOR: { | 1728 case LookupIterator::ACCESSOR: { |
1729 if (!holder->HasFastProperties()) { | 1729 if (!holder->HasFastProperties()) { |
1730 TRACE_GENERIC_IC(isolate(), "StoreIC", "accessor on slow map"); | 1730 TRACE_GENERIC_IC(isolate(), "StoreIC", "accessor on slow map"); |
1731 break; | 1731 break; |
1732 } | 1732 } |
1733 Handle<Object> accessors = lookup->GetAccessors(); | 1733 Handle<Object> accessors = lookup->GetAccessors(); |
1734 if (accessors->IsAccessorInfo()) { | 1734 if (accessors->IsAccessorInfo()) { |
1735 Handle<AccessorInfo> info = Handle<AccessorInfo>::cast(accessors); | 1735 Handle<AccessorInfo> info = Handle<AccessorInfo>::cast(accessors); |
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2936 KeyedLoadICNexus nexus(vector, vector_slot); | 2936 KeyedLoadICNexus nexus(vector, vector_slot); |
2937 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); | 2937 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); |
2938 ic.UpdateState(receiver, key); | 2938 ic.UpdateState(receiver, key); |
2939 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); | 2939 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); |
2940 } | 2940 } |
2941 | 2941 |
2942 return *result; | 2942 return *result; |
2943 } | 2943 } |
2944 } // namespace internal | 2944 } // namespace internal |
2945 } // namespace v8 | 2945 } // namespace v8 |
OLD | NEW |