OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/isolate-inl.h" | 8 #include "src/isolate-inl.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 STATIC_ASSERT(JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); | 178 STATIC_ASSERT(JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); |
179 if (receiver_map->instance_type() == JS_PROXY_TYPE) { | 179 if (receiver_map->instance_type() == JS_PROXY_TYPE) { |
180 // Zero indicates proxy | 180 // Zero indicates proxy |
181 cache_type = Handle<Object>(Smi::FromInt(0), isolate); | 181 cache_type = Handle<Object>(Smi::FromInt(0), isolate); |
182 } else { | 182 } else { |
183 // One entails slow check | 183 // One entails slow check |
184 cache_type = Handle<Object>(Smi::FromInt(1), isolate); | 184 cache_type = Handle<Object>(Smi::FromInt(1), isolate); |
185 } | 185 } |
186 } | 186 } |
187 | 187 |
188 Handle<FixedArray> result = isolate->factory()->NewFixedArray(4); | 188 Handle<FixedArray> result = isolate->factory()->NewFixedArray(3); |
189 result->set(0, *receiver); | 189 result->set(0, *cache_type); |
190 result->set(1, *cache_array); | 190 result->set(1, *cache_array); |
191 result->set(2, *cache_type); | 191 result->set(2, Smi::FromInt(cache_length)); |
192 result->set(3, Smi::FromInt(cache_length)); | |
193 return *result; | 192 return *result; |
194 } | 193 } |
195 | 194 |
196 | |
197 } // namespace internal | 195 } // namespace internal |
198 } // namespace v8 | 196 } // namespace v8 |
OLD | NEW |