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 "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "accessors.h" | 7 #include "accessors.h" |
8 #include "api.h" | 8 #include "api.h" |
9 #include "arguments.h" | 9 #include "arguments.h" |
10 #include "codegen.h" | 10 #include "codegen.h" |
(...skipping 1776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1787 if (!(receiver->map()->DictionaryElementsInPrototypeChainOnly())) { | 1787 if (!(receiver->map()->DictionaryElementsInPrototypeChainOnly())) { |
1788 KeyedAccessStoreMode store_mode = | 1788 KeyedAccessStoreMode store_mode = |
1789 GetStoreMode(receiver, key, value); | 1789 GetStoreMode(receiver, key, value); |
1790 stub = StoreElementStub(receiver, store_mode); | 1790 stub = StoreElementStub(receiver, store_mode); |
1791 } | 1791 } |
1792 } | 1792 } |
1793 } | 1793 } |
1794 } | 1794 } |
1795 } | 1795 } |
1796 | 1796 |
1797 Handle<Object> result; | |
1798 | |
1799 if (store_handle.is_null()) { | |
1800 ASSIGN_RETURN_ON_EXCEPTION( | |
1801 isolate(), | |
1802 result, | |
Michael Starzinger
2014/05/21 12:34:36
nit: We should be able to assign to store_handle h
ulan
2014/05/21 14:52:22
Done.
| |
1803 Runtime::SetObjectProperty( | |
1804 isolate(), object, key, value, NONE, strict_mode()), | |
Michael Starzinger
2014/05/21 12:34:36
nit: Only one white-space in front of NONE here.
ulan
2014/05/21 14:52:22
Done.
| |
1805 Object); | |
1806 } | |
1807 | |
1797 if (!is_target_set()) { | 1808 if (!is_target_set()) { |
1798 if (*stub == *generic_stub()) { | 1809 if (*stub == *generic_stub()) { |
1799 TRACE_GENERIC_IC(isolate(), "KeyedStoreIC", "set generic"); | 1810 TRACE_GENERIC_IC(isolate(), "KeyedStoreIC", "set generic"); |
1800 } | 1811 } |
1801 ASSERT(!stub.is_null()); | 1812 ASSERT(!stub.is_null()); |
1802 set_target(*stub); | 1813 set_target(*stub); |
1803 TRACE_IC("StoreIC", key); | 1814 TRACE_IC("StoreIC", key); |
1804 } | 1815 } |
1805 | 1816 |
1806 if (!store_handle.is_null()) return store_handle; | 1817 return store_handle.is_null() ? result : store_handle; |
1807 Handle<Object> result; | |
1808 ASSIGN_RETURN_ON_EXCEPTION( | |
1809 isolate(), | |
1810 result, | |
1811 Runtime::SetObjectProperty( | |
1812 isolate(), object, key, value, NONE, strict_mode()), | |
1813 Object); | |
1814 return result; | |
1815 } | 1818 } |
1816 | 1819 |
1817 | 1820 |
1818 CallIC::State::State(ExtraICState extra_ic_state) | 1821 CallIC::State::State(ExtraICState extra_ic_state) |
1819 : argc_(ArgcBits::decode(extra_ic_state)), | 1822 : argc_(ArgcBits::decode(extra_ic_state)), |
1820 call_type_(CallTypeBits::decode(extra_ic_state)) { | 1823 call_type_(CallTypeBits::decode(extra_ic_state)) { |
1821 } | 1824 } |
1822 | 1825 |
1823 | 1826 |
1824 ExtraICState CallIC::State::GetExtraICState() const { | 1827 ExtraICState CallIC::State::GetExtraICState() const { |
(...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2996 #undef ADDR | 2999 #undef ADDR |
2997 }; | 3000 }; |
2998 | 3001 |
2999 | 3002 |
3000 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 3003 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
3001 return IC_utilities[id]; | 3004 return IC_utilities[id]; |
3002 } | 3005 } |
3003 | 3006 |
3004 | 3007 |
3005 } } // namespace v8::internal | 3008 } } // namespace v8::internal |
OLD | NEW |