| 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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 Handle<Map> receiver_map = receiver_maps->at(i); | 415 Handle<Map> receiver_map = receiver_maps->at(i); |
| 416 Handle<Code> cached_stub; | 416 Handle<Code> cached_stub; |
| 417 | 417 |
| 418 if (receiver_map->IsStringMap()) { | 418 if (receiver_map->IsStringMap()) { |
| 419 cached_stub = LoadIndexedStringStub(isolate()).GetCode(); | 419 cached_stub = LoadIndexedStringStub(isolate()).GetCode(); |
| 420 } else if (receiver_map->instance_type() < FIRST_JS_RECEIVER_TYPE) { | 420 } else if (receiver_map->instance_type() < FIRST_JS_RECEIVER_TYPE) { |
| 421 cached_stub = isolate()->builtins()->KeyedLoadIC_Slow(); | 421 cached_stub = isolate()->builtins()->KeyedLoadIC_Slow(); |
| 422 } else { | 422 } else { |
| 423 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; | 423 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; |
| 424 ElementsKind elements_kind = receiver_map->elements_kind(); | 424 ElementsKind elements_kind = receiver_map->elements_kind(); |
| 425 if (receiver_map->has_indexed_interceptor()) { | 425 if (IsSloppyArgumentsElements(elements_kind)) { |
| 426 cached_stub = LoadIndexedInterceptorStub(isolate()).GetCode(); | |
| 427 } else if (IsSloppyArgumentsElements(elements_kind)) { | |
| 428 cached_stub = KeyedLoadSloppyArgumentsStub(isolate()).GetCode(); | 426 cached_stub = KeyedLoadSloppyArgumentsStub(isolate()).GetCode(); |
| 429 } else if (IsFastElementsKind(elements_kind) || | 427 } else if (IsFastElementsKind(elements_kind) || |
| 430 IsExternalArrayElementsKind(elements_kind) || | 428 IsExternalArrayElementsKind(elements_kind) || |
| 431 IsFixedTypedArrayElementsKind(elements_kind)) { | 429 IsFixedTypedArrayElementsKind(elements_kind)) { |
| 432 cached_stub = LoadFastElementStub(isolate(), is_js_array, elements_kind) | 430 cached_stub = LoadFastElementStub(isolate(), is_js_array, elements_kind) |
| 433 .GetCode(); | 431 .GetCode(); |
| 434 } else { | 432 } else { |
| 435 DCHECK(elements_kind == DICTIONARY_ELEMENTS); | 433 DCHECK(elements_kind == DICTIONARY_ELEMENTS); |
| 436 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); | 434 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); |
| 437 } | 435 } |
| 438 } | 436 } |
| 439 | 437 |
| 440 handlers->Add(cached_stub); | 438 handlers->Add(cached_stub); |
| 441 } | 439 } |
| 442 } | 440 } |
| 443 } | 441 } |
| 444 } // namespace v8::internal | 442 } // namespace v8::internal |
| OLD | NEW |