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 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1686 | 1686 |
1687 | 1687 |
1688 Handle<Code> StoreIC::CompileHandler(LookupIterator* lookup, | 1688 Handle<Code> StoreIC::CompileHandler(LookupIterator* lookup, |
1689 Handle<Object> value, | 1689 Handle<Object> value, |
1690 CacheHolderFlag cache_holder) { | 1690 CacheHolderFlag cache_holder) { |
1691 DCHECK_NE(LookupIterator::JSPROXY, lookup->state()); | 1691 DCHECK_NE(LookupIterator::JSPROXY, lookup->state()); |
1692 | 1692 |
1693 // This is currently guaranteed by checks in StoreIC::Store. | 1693 // This is currently guaranteed by checks in StoreIC::Store. |
1694 Handle<JSObject> receiver = Handle<JSObject>::cast(lookup->GetReceiver()); | 1694 Handle<JSObject> receiver = Handle<JSObject>::cast(lookup->GetReceiver()); |
1695 Handle<JSObject> holder = lookup->GetHolder<JSObject>(); | 1695 Handle<JSObject> holder = lookup->GetHolder<JSObject>(); |
1696 DCHECK(!receiver->IsAccessCheckNeeded() || | 1696 DCHECK(!receiver->IsAccessCheckNeeded() || lookup->name()->IsPrivate()); |
1697 isolate()->IsInternallyUsedPropertyName(lookup->name())); | |
1698 | 1697 |
1699 switch (lookup->state()) { | 1698 switch (lookup->state()) { |
1700 case LookupIterator::TRANSITION: { | 1699 case LookupIterator::TRANSITION: { |
1701 auto store_target = lookup->GetStoreTarget(); | 1700 auto store_target = lookup->GetStoreTarget(); |
1702 if (store_target->IsJSGlobalObject()) { | 1701 if (store_target->IsJSGlobalObject()) { |
1703 // TODO(dcarney): this currently just deopts. Use the transition cell. | 1702 // TODO(dcarney): this currently just deopts. Use the transition cell. |
1704 auto cell = isolate()->factory()->NewPropertyCell(); | 1703 auto cell = isolate()->factory()->NewPropertyCell(); |
1705 cell->set_value(*value); | 1704 cell->set_value(*value); |
1706 auto code = PropertyCellStoreHandler( | 1705 auto code = PropertyCellStoreHandler( |
1707 isolate(), store_target, Handle<JSGlobalObject>::cast(store_target), | 1706 isolate(), store_target, Handle<JSGlobalObject>::cast(store_target), |
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2953 KeyedLoadICNexus nexus(vector, vector_slot); | 2952 KeyedLoadICNexus nexus(vector, vector_slot); |
2954 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); | 2953 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); |
2955 ic.UpdateState(receiver, key); | 2954 ic.UpdateState(receiver, key); |
2956 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); | 2955 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); |
2957 } | 2956 } |
2958 | 2957 |
2959 return *result; | 2958 return *result; |
2960 } | 2959 } |
2961 } // namespace internal | 2960 } // namespace internal |
2962 } // namespace v8 | 2961 } // namespace v8 |
OLD | NEW |