| 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/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 #include "src/ic/ic-compiler.h" | 9 #include "src/ic/ic-compiler.h" |
| 10 | 10 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC); | 89 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC); |
| 90 Handle<Name> name = isolate->factory()->KeyedLoadMonomorphic_string(); | 90 Handle<Name> name = isolate->factory()->KeyedLoadMonomorphic_string(); |
| 91 | 91 |
| 92 Handle<Object> probe(receiver_map->FindInCodeCache(*name, flags), isolate); | 92 Handle<Object> probe(receiver_map->FindInCodeCache(*name, flags), isolate); |
| 93 if (probe->IsCode()) return Handle<Code>::cast(probe); | 93 if (probe->IsCode()) return Handle<Code>::cast(probe); |
| 94 | 94 |
| 95 ElementsKind elements_kind = receiver_map->elements_kind(); | 95 ElementsKind elements_kind = receiver_map->elements_kind(); |
| 96 Handle<Code> stub; | 96 Handle<Code> stub; |
| 97 if (receiver_map->has_indexed_interceptor()) { | 97 if (receiver_map->has_indexed_interceptor()) { |
| 98 stub = LoadIndexedInterceptorStub(isolate).GetCode(); | 98 stub = LoadIndexedInterceptorStub(isolate).GetCode(); |
| 99 } else if (receiver_map->has_sloppy_arguments_elements()) { |
| 100 stub = KeyedLoadSloppyArgumentsStub(isolate).GetCode(); |
| 99 } else if (receiver_map->has_fast_elements() || | 101 } else if (receiver_map->has_fast_elements() || |
| 100 receiver_map->has_external_array_elements() || | 102 receiver_map->has_external_array_elements() || |
| 101 receiver_map->has_fixed_typed_array_elements()) { | 103 receiver_map->has_fixed_typed_array_elements()) { |
| 102 stub = LoadFastElementStub(isolate, | 104 stub = LoadFastElementStub(isolate, |
| 103 receiver_map->instance_type() == JS_ARRAY_TYPE, | 105 receiver_map->instance_type() == JS_ARRAY_TYPE, |
| 104 elements_kind).GetCode(); | 106 elements_kind).GetCode(); |
| 105 } else { | 107 } else { |
| 106 stub = LoadDictionaryElementStub(isolate).GetCode(); | 108 stub = LoadDictionaryElementStub(isolate).GetCode(); |
| 107 } | 109 } |
| 108 PropertyICCompiler compiler(isolate, Code::KEYED_LOAD_IC); | 110 PropertyICCompiler compiler(isolate, Code::KEYED_LOAD_IC); |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 | 438 |
| 437 TailCallBuiltin(masm(), Builtins::kKeyedStoreIC_Miss); | 439 TailCallBuiltin(masm(), Builtins::kKeyedStoreIC_Miss); |
| 438 | 440 |
| 439 return GetCode(kind(), Code::NORMAL, factory()->empty_string()); | 441 return GetCode(kind(), Code::NORMAL, factory()->empty_string()); |
| 440 } | 442 } |
| 441 | 443 |
| 442 | 444 |
| 443 #undef __ | 445 #undef __ |
| 444 } | 446 } |
| 445 } // namespace v8::internal | 447 } // namespace v8::internal |
| OLD | NEW |