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 |
21 Code::Flags flags = Code::ComputeHandlerFlags(kind, cache_holder); | 24 Code::Flags flags = Code::ComputeHandlerFlags(kind, cache_holder); |
22 Code* code = stub_holder->LookupInCodeCache(*name, flags); | 25 Code* code = stub_holder->LookupInCodeCache(*name, flags); |
23 if (code == nullptr) return Handle<Code>(); | 26 if (code == nullptr) return Handle<Code>(); |
24 return handle(code); | 27 return handle(code); |
25 } | 28 } |
26 | 29 |
27 | 30 |
28 Handle<Code> NamedLoadHandlerCompiler::ComputeLoadNonexistent( | 31 Handle<Code> NamedLoadHandlerCompiler::ComputeLoadNonexistent( |
29 Handle<Name> name, Handle<Map> receiver_map) { | 32 Handle<Name> name, Handle<Map> receiver_map) { |
30 Isolate* isolate = name->GetIsolate(); | 33 Isolate* isolate = name->GetIsolate(); |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 } | 647 } |
645 | 648 |
646 void ElementHandlerCompiler::CompileElementHandlers( | 649 void ElementHandlerCompiler::CompileElementHandlers( |
647 MapHandleList* receiver_maps, List<Handle<Object>>* handlers) { | 650 MapHandleList* receiver_maps, List<Handle<Object>>* handlers) { |
648 for (int i = 0; i < receiver_maps->length(); ++i) { | 651 for (int i = 0; i < receiver_maps->length(); ++i) { |
649 handlers->Add(GetKeyedLoadHandler(receiver_maps->at(i), isolate())); | 652 handlers->Add(GetKeyedLoadHandler(receiver_maps->at(i), isolate())); |
650 } | 653 } |
651 } | 654 } |
652 } // namespace internal | 655 } // namespace internal |
653 } // namespace v8 | 656 } // namespace v8 |
OLD | NEW |