OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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-compiler.h" | 5 #include "src/ic/ic-compiler.h" |
6 | 6 |
7 #include "src/ic/handler-compiler.h" | 7 #include "src/ic/handler-compiler.h" |
8 #include "src/ic/ic-inl.h" | 8 #include "src/ic/ic-inl.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 if (receiver_map->has_sloppy_arguments_elements()) { | 98 if (receiver_map->has_sloppy_arguments_elements()) { |
99 TRACE_HANDLER_STATS(isolate(), KeyedStoreIC_KeyedStoreSloppyArgumentsStub); | 99 TRACE_HANDLER_STATS(isolate(), KeyedStoreIC_KeyedStoreSloppyArgumentsStub); |
100 stub = KeyedStoreSloppyArgumentsStub(isolate(), store_mode).GetCode(); | 100 stub = KeyedStoreSloppyArgumentsStub(isolate(), store_mode).GetCode(); |
101 } else if (receiver_map->has_fast_elements() || | 101 } else if (receiver_map->has_fast_elements() || |
102 receiver_map->has_fixed_typed_array_elements()) { | 102 receiver_map->has_fixed_typed_array_elements()) { |
103 TRACE_HANDLER_STATS(isolate(), KeyedStoreIC_StoreFastElementStub); | 103 TRACE_HANDLER_STATS(isolate(), KeyedStoreIC_StoreFastElementStub); |
104 stub = StoreFastElementStub(isolate(), is_jsarray, elements_kind, | 104 stub = StoreFastElementStub(isolate(), is_jsarray, elements_kind, |
105 store_mode).GetCode(); | 105 store_mode).GetCode(); |
106 } else { | 106 } else { |
107 TRACE_HANDLER_STATS(isolate(), KeyedStoreIC_StoreElementStub); | 107 TRACE_HANDLER_STATS(isolate(), KeyedStoreIC_StoreElementStub); |
108 stub = StoreElementStub(isolate(), elements_kind, store_mode).GetCode(); | 108 DCHECK_EQ(DICTIONARY_ELEMENTS, elements_kind); |
| 109 stub = StoreSlowElementStub(isolate(), store_mode).GetCode(); |
109 } | 110 } |
110 Handle<Object> validity_cell = | 111 Handle<Object> validity_cell = |
111 Map::GetOrCreatePrototypeChainValidityCell(receiver_map, isolate()); | 112 Map::GetOrCreatePrototypeChainValidityCell(receiver_map, isolate()); |
112 if (validity_cell.is_null()) { | 113 if (validity_cell.is_null()) { |
113 return stub; | 114 return stub; |
114 } | 115 } |
115 return isolate()->factory()->NewTuple2(validity_cell, stub); | 116 return isolate()->factory()->NewTuple2(validity_cell, stub); |
116 } | 117 } |
117 | 118 |
118 | 119 |
119 #undef __ | 120 #undef __ |
120 } // namespace internal | 121 } // namespace internal |
121 } // namespace v8 | 122 } // namespace v8 |
OLD | NEW |