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" | |
13 #include "src/codegen.h" | 12 #include "src/codegen.h" |
14 #include "src/conversions.h" | 13 #include "src/conversions.h" |
15 #include "src/execution.h" | 14 #include "src/execution.h" |
16 #include "src/field-type.h" | 15 #include "src/field-type.h" |
17 #include "src/frames-inl.h" | 16 #include "src/frames-inl.h" |
18 #include "src/ic/call-optimization.h" | 17 #include "src/ic/call-optimization.h" |
19 #include "src/ic/handler-compiler.h" | 18 #include "src/ic/handler-compiler.h" |
20 #include "src/ic/ic-inl.h" | 19 #include "src/ic/ic-inl.h" |
21 #include "src/ic/ic-compiler.h" | 20 #include "src/ic/ic-compiler.h" |
22 #include "src/ic/stub-cache.h" | 21 #include "src/ic/stub-cache.h" |
(...skipping 1490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1513 break; | 1512 break; |
1514 } | 1513 } |
1515 | 1514 |
1516 DCHECK(lookup->IsCacheableTransition()); | 1515 DCHECK(lookup->IsCacheableTransition()); |
1517 NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder); | 1516 NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder); |
1518 return compiler.CompileStoreTransition(transition, lookup->name()); | 1517 return compiler.CompileStoreTransition(transition, lookup->name()); |
1519 } | 1518 } |
1520 | 1519 |
1521 case LookupIterator::INTERCEPTOR: { | 1520 case LookupIterator::INTERCEPTOR: { |
1522 DCHECK(!holder->GetNamedInterceptor()->setter()->IsUndefined()); | 1521 DCHECK(!holder->GetNamedInterceptor()->setter()->IsUndefined()); |
1523 return CodeFactory::StoreInterceptor(isolate()).code(); | 1522 StoreInterceptorStub stub(isolate()); |
| 1523 return stub.GetCode(); |
1524 } | 1524 } |
1525 | 1525 |
1526 case LookupIterator::ACCESSOR: { | 1526 case LookupIterator::ACCESSOR: { |
1527 if (!holder->HasFastProperties()) { | 1527 if (!holder->HasFastProperties()) { |
1528 TRACE_GENERIC_IC(isolate(), "StoreIC", "accessor on slow map"); | 1528 TRACE_GENERIC_IC(isolate(), "StoreIC", "accessor on slow map"); |
1529 break; | 1529 break; |
1530 } | 1530 } |
1531 Handle<Object> accessors = lookup->GetAccessors(); | 1531 Handle<Object> accessors = lookup->GetAccessors(); |
1532 if (accessors->IsAccessorInfo()) { | 1532 if (accessors->IsAccessorInfo()) { |
1533 Handle<AccessorInfo> info = Handle<AccessorInfo>::cast(accessors); | 1533 Handle<AccessorInfo> info = Handle<AccessorInfo>::cast(accessors); |
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2730 KeyedLoadICNexus nexus(vector, vector_slot); | 2730 KeyedLoadICNexus nexus(vector, vector_slot); |
2731 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); | 2731 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); |
2732 ic.UpdateState(receiver, key); | 2732 ic.UpdateState(receiver, key); |
2733 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); | 2733 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); |
2734 } | 2734 } |
2735 | 2735 |
2736 return *result; | 2736 return *result; |
2737 } | 2737 } |
2738 } // namespace internal | 2738 } // namespace internal |
2739 } // namespace v8 | 2739 } // namespace v8 |
OLD | NEW |