| 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/handler-compiler.h" | 5 #include "src/ic/handler-compiler.h" |
| 6 | 6 |
| 7 #include "src/field-type.h" | 7 #include "src/field-type.h" |
| 8 #include "src/ic/call-optimization.h" | 8 #include "src/ic/call-optimization.h" |
| 9 #include "src/ic/handler-configuration-inl.h" | 9 #include "src/ic/handler-configuration-inl.h" |
| 10 #include "src/ic/ic-inl.h" | 10 #include "src/ic/ic-inl.h" |
| 11 #include "src/ic/ic.h" | 11 #include "src/ic/ic.h" |
| 12 #include "src/isolate-inl.h" | 12 #include "src/isolate-inl.h" |
| 13 | 13 |
| 14 namespace v8 { | 14 namespace v8 { |
| 15 namespace internal { | 15 namespace internal { |
| 16 | 16 |
| 17 Handle<Code> PropertyHandlerCompiler::Find(Handle<Name> name, | 17 Handle<Code> PropertyHandlerCompiler::Find(Handle<Name> name, |
| 18 Handle<Map> stub_holder, | 18 Handle<Map> stub_holder, |
| 19 Code::Kind kind, | 19 Code::Kind kind, |
| 20 CacheHolderFlag cache_holder) { | 20 CacheHolderFlag cache_holder) { |
| 21 // TODO(ishell): Experiment: don't cache handlers in map-specific code cache. | |
| 22 return Handle<Code>(); | |
| 23 | |
| 24 Code::Flags flags = Code::ComputeHandlerFlags(kind, cache_holder); | 21 Code::Flags flags = Code::ComputeHandlerFlags(kind, cache_holder); |
| 25 Code* code = stub_holder->LookupInCodeCache(*name, flags); | 22 Code* code = stub_holder->LookupInCodeCache(*name, flags); |
| 26 if (code == nullptr) return Handle<Code>(); | 23 if (code == nullptr) return Handle<Code>(); |
| 27 return handle(code); | 24 return handle(code); |
| 28 } | 25 } |
| 29 | 26 |
| 30 | 27 |
| 31 Handle<Code> NamedLoadHandlerCompiler::ComputeLoadNonexistent( | 28 Handle<Code> NamedLoadHandlerCompiler::ComputeLoadNonexistent( |
| 32 Handle<Name> name, Handle<Map> receiver_map) { | 29 Handle<Name> name, Handle<Map> receiver_map) { |
| 33 Isolate* isolate = name->GetIsolate(); | 30 Isolate* isolate = name->GetIsolate(); |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 } | 644 } |
| 648 | 645 |
| 649 void ElementHandlerCompiler::CompileElementHandlers( | 646 void ElementHandlerCompiler::CompileElementHandlers( |
| 650 MapHandleList* receiver_maps, List<Handle<Object>>* handlers) { | 647 MapHandleList* receiver_maps, List<Handle<Object>>* handlers) { |
| 651 for (int i = 0; i < receiver_maps->length(); ++i) { | 648 for (int i = 0; i < receiver_maps->length(); ++i) { |
| 652 handlers->Add(GetKeyedLoadHandler(receiver_maps->at(i), isolate())); | 649 handlers->Add(GetKeyedLoadHandler(receiver_maps->at(i), isolate())); |
| 653 } | 650 } |
| 654 } | 651 } |
| 655 } // namespace internal | 652 } // namespace internal |
| 656 } // namespace v8 | 653 } // namespace v8 |
| OLD | NEW |