| 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/v8.h" | 5 #include "src/v8.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 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1618 | 1618 |
| 1619 | 1619 |
| 1620 Handle<Code> StoreIC::CompileHandler(LookupIterator* lookup, | 1620 Handle<Code> StoreIC::CompileHandler(LookupIterator* lookup, |
| 1621 Handle<Object> value, | 1621 Handle<Object> value, |
| 1622 CacheHolderFlag cache_holder) { | 1622 CacheHolderFlag cache_holder) { |
| 1623 DCHECK_NE(LookupIterator::JSPROXY, lookup->state()); | 1623 DCHECK_NE(LookupIterator::JSPROXY, lookup->state()); |
| 1624 | 1624 |
| 1625 // This is currently guaranteed by checks in StoreIC::Store. | 1625 // This is currently guaranteed by checks in StoreIC::Store. |
| 1626 Handle<JSObject> receiver = Handle<JSObject>::cast(lookup->GetReceiver()); | 1626 Handle<JSObject> receiver = Handle<JSObject>::cast(lookup->GetReceiver()); |
| 1627 Handle<JSObject> holder = lookup->GetHolder<JSObject>(); | 1627 Handle<JSObject> holder = lookup->GetHolder<JSObject>(); |
| 1628 DCHECK(!receiver->IsAccessCheckNeeded()); | 1628 DCHECK(!receiver->IsAccessCheckNeeded() || |
| 1629 isolate()->IsInternallyUsedPropertyName(lookup->name())); |
| 1629 | 1630 |
| 1630 switch (lookup->state()) { | 1631 switch (lookup->state()) { |
| 1631 case LookupIterator::TRANSITION: { | 1632 case LookupIterator::TRANSITION: { |
| 1632 auto store_target = lookup->GetStoreTarget(); | 1633 auto store_target = lookup->GetStoreTarget(); |
| 1633 if (store_target->IsGlobalObject()) { | 1634 if (store_target->IsGlobalObject()) { |
| 1634 // TODO(dcarney): this currently just deopts. Use the transition cell. | 1635 // TODO(dcarney): this currently just deopts. Use the transition cell. |
| 1635 auto cell = isolate()->factory()->NewPropertyCell(); | 1636 auto cell = isolate()->factory()->NewPropertyCell(); |
| 1636 cell->set_value(*value); | 1637 cell->set_value(*value); |
| 1637 auto code = PropertyCellStoreHandler( | 1638 auto code = PropertyCellStoreHandler( |
| 1638 isolate(), store_target, Handle<GlobalObject>::cast(store_target), | 1639 isolate(), store_target, Handle<GlobalObject>::cast(store_target), |
| (...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2911 static const Address IC_utilities[] = { | 2912 static const Address IC_utilities[] = { |
| 2912 #define ADDR(name) FUNCTION_ADDR(name), | 2913 #define ADDR(name) FUNCTION_ADDR(name), |
| 2913 IC_UTIL_LIST(ADDR) NULL | 2914 IC_UTIL_LIST(ADDR) NULL |
| 2914 #undef ADDR | 2915 #undef ADDR |
| 2915 }; | 2916 }; |
| 2916 | 2917 |
| 2917 | 2918 |
| 2918 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } | 2919 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } |
| 2919 } | 2920 } |
| 2920 } // namespace v8::internal | 2921 } // namespace v8::internal |
| OLD | NEW |