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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/ic/call-optimization.h" | 7 #include "src/ic/call-optimization.h" |
8 #include "src/ic/handler-compiler.h" | 8 #include "src/ic/handler-compiler.h" |
9 #include "src/ic/ic.h" | 9 #include "src/ic/ic.h" |
10 #include "src/ic/ic-inl.h" | 10 #include "src/ic/ic-inl.h" |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 | 383 |
384 if ((receiver_map->instance_type() & kNotStringTag) == 0) { | 384 if ((receiver_map->instance_type() & kNotStringTag) == 0) { |
385 cached_stub = isolate()->builtins()->KeyedLoadIC_String(); | 385 cached_stub = isolate()->builtins()->KeyedLoadIC_String(); |
386 } else if (receiver_map->instance_type() < FIRST_JS_RECEIVER_TYPE) { | 386 } else if (receiver_map->instance_type() < FIRST_JS_RECEIVER_TYPE) { |
387 cached_stub = isolate()->builtins()->KeyedLoadIC_Slow(); | 387 cached_stub = isolate()->builtins()->KeyedLoadIC_Slow(); |
388 } else { | 388 } else { |
389 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; | 389 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; |
390 ElementsKind elements_kind = receiver_map->elements_kind(); | 390 ElementsKind elements_kind = receiver_map->elements_kind(); |
391 if (receiver_map->has_indexed_interceptor()) { | 391 if (receiver_map->has_indexed_interceptor()) { |
392 cached_stub = LoadIndexedInterceptorStub(isolate()).GetCode(); | 392 cached_stub = LoadIndexedInterceptorStub(isolate()).GetCode(); |
| 393 } else if (IsSloppyArgumentsElements(elements_kind)) { |
| 394 cached_stub = KeyedLoadSloppyArgumentsStub(isolate()).GetCode(); |
393 } else if (IsFastElementsKind(elements_kind) || | 395 } else if (IsFastElementsKind(elements_kind) || |
394 IsExternalArrayElementsKind(elements_kind) || | 396 IsExternalArrayElementsKind(elements_kind) || |
395 IsFixedTypedArrayElementsKind(elements_kind)) { | 397 IsFixedTypedArrayElementsKind(elements_kind)) { |
396 cached_stub = LoadFastElementStub(isolate(), is_js_array, elements_kind) | 398 cached_stub = LoadFastElementStub(isolate(), is_js_array, elements_kind) |
397 .GetCode(); | 399 .GetCode(); |
398 } else if (elements_kind == SLOPPY_ARGUMENTS_ELEMENTS) { | |
399 cached_stub = isolate()->builtins()->KeyedLoadIC_SloppyArguments(); | |
400 } else { | 400 } else { |
401 DCHECK(elements_kind == DICTIONARY_ELEMENTS); | 401 DCHECK(elements_kind == DICTIONARY_ELEMENTS); |
402 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); | 402 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); |
403 } | 403 } |
404 } | 404 } |
405 | 405 |
406 handlers->Add(cached_stub); | 406 handlers->Add(cached_stub); |
407 } | 407 } |
408 } | 408 } |
409 } | 409 } |
410 } // namespace v8::internal | 410 } // namespace v8::internal |
OLD | NEW |