| 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-arguments-inl.h" | 8 #include "src/api-arguments-inl.h" | 
| 9 #include "src/api.h" | 9 #include "src/api.h" | 
| 10 #include "src/arguments.h" | 10 #include "src/arguments.h" | 
| (...skipping 1737 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1748 | 1748 | 
| 1749   // This is currently guaranteed by checks in StoreIC::Store. | 1749   // This is currently guaranteed by checks in StoreIC::Store. | 
| 1750   Handle<JSObject> receiver = Handle<JSObject>::cast(lookup->GetReceiver()); | 1750   Handle<JSObject> receiver = Handle<JSObject>::cast(lookup->GetReceiver()); | 
| 1751   Handle<JSObject> holder = lookup->GetHolder<JSObject>(); | 1751   Handle<JSObject> holder = lookup->GetHolder<JSObject>(); | 
| 1752   DCHECK(!receiver->IsAccessCheckNeeded() || lookup->name()->IsPrivate()); | 1752   DCHECK(!receiver->IsAccessCheckNeeded() || lookup->name()->IsPrivate()); | 
| 1753 | 1753 | 
| 1754   switch (lookup->state()) { | 1754   switch (lookup->state()) { | 
| 1755     case LookupIterator::TRANSITION: { | 1755     case LookupIterator::TRANSITION: { | 
| 1756       auto store_target = lookup->GetStoreTarget(); | 1756       auto store_target = lookup->GetStoreTarget(); | 
| 1757       if (store_target->IsJSGlobalObject()) { | 1757       if (store_target->IsJSGlobalObject()) { | 
| 1758         // TODO(dcarney): this currently just deopts. Use the transition cell. |  | 
| 1759         TRACE_HANDLER_STATS(isolate(), StoreIC_StoreGlobalTransition); | 1758         TRACE_HANDLER_STATS(isolate(), StoreIC_StoreGlobalTransition); | 
| 1760         auto cell = isolate()->factory()->NewPropertyCell(); | 1759         Handle<PropertyCell> cell = lookup->transition_cell(); | 
| 1761         cell->set_value(*value); | 1760         cell->set_value(*value); | 
| 1762         auto code = PropertyCellStoreHandler( | 1761         Handle<Code> code = PropertyCellStoreHandler( | 
| 1763             isolate(), store_target, Handle<JSGlobalObject>::cast(store_target), | 1762             isolate(), store_target, Handle<JSGlobalObject>::cast(store_target), | 
| 1764             lookup->name(), cell, PropertyCellType::kConstant); | 1763             lookup->name(), cell, PropertyCellType::kConstant); | 
| 1765         cell->set_value(isolate()->heap()->the_hole_value()); | 1764         cell->set_value(isolate()->heap()->the_hole_value()); | 
| 1766         return code; | 1765         return code; | 
| 1767       } | 1766       } | 
| 1768       Handle<Map> transition = lookup->transition_map(); | 1767       Handle<Map> transition = lookup->transition_map(); | 
| 1769       // Currently not handled by CompileStoreTransition. | 1768       // Currently not handled by CompileStoreTransition. | 
| 1770       DCHECK(holder->HasFastProperties()); | 1769       DCHECK(holder->HasFastProperties()); | 
| 1771 | 1770 | 
| 1772       DCHECK(lookup->IsCacheableTransition()); | 1771       DCHECK(lookup->IsCacheableTransition()); | 
| (...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3014     DCHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC, | 3013     DCHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC, | 
| 3015               vector->GetKind(vector_slot)); | 3014               vector->GetKind(vector_slot)); | 
| 3016     KeyedLoadICNexus nexus(vector, vector_slot); | 3015     KeyedLoadICNexus nexus(vector, vector_slot); | 
| 3017     KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); | 3016     KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); | 
| 3018     ic.UpdateState(receiver, key); | 3017     ic.UpdateState(receiver, key); | 
| 3019     RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key)); | 3018     RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key)); | 
| 3020   } | 3019   } | 
| 3021 } | 3020 } | 
| 3022 }  // namespace internal | 3021 }  // namespace internal | 
| 3023 }  // namespace v8 | 3022 }  // namespace v8 | 
| OLD | NEW | 
|---|