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/ic-inl.h" | 9 #include "src/ic/ic-inl.h" |
10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 last = handle(JSObject::cast(current_map->prototype())); | 61 last = handle(JSObject::cast(current_map->prototype())); |
62 current_map = handle(last->map()); | 62 current_map = handle(last->map()); |
63 } | 63 } |
64 // Compile the stub that is either shared for all names or | 64 // Compile the stub that is either shared for all names or |
65 // name specific if there are global objects involved. | 65 // name specific if there are global objects involved. |
66 Handle<Code> handler = PropertyHandlerCompiler::Find( | 66 Handle<Code> handler = PropertyHandlerCompiler::Find( |
67 cache_name, stub_holder_map, Code::LOAD_IC, flag); | 67 cache_name, stub_holder_map, Code::LOAD_IC, flag); |
68 if (!handler.is_null()) return handler; | 68 if (!handler.is_null()) return handler; |
69 | 69 |
| 70 TRACE_HANDLER_STATS(isolate, LoadIC_LoadNonexistent); |
70 NamedLoadHandlerCompiler compiler(isolate, receiver_map, last, flag); | 71 NamedLoadHandlerCompiler compiler(isolate, receiver_map, last, flag); |
71 handler = compiler.CompileLoadNonexistent(cache_name); | 72 handler = compiler.CompileLoadNonexistent(cache_name); |
72 Map::UpdateCodeCache(stub_holder_map, cache_name, handler); | 73 Map::UpdateCodeCache(stub_holder_map, cache_name, handler); |
73 return handler; | 74 return handler; |
74 } | 75 } |
75 | 76 |
76 | 77 |
77 Handle<Code> PropertyHandlerCompiler::GetCode(Code::Kind kind, | 78 Handle<Code> PropertyHandlerCompiler::GetCode(Code::Kind kind, |
78 Handle<Name> name) { | 79 Handle<Name> name) { |
79 Code::Flags flags = Code::ComputeHandlerFlags(kind, cache_holder()); | 80 Code::Flags flags = Code::ComputeHandlerFlags(kind, cache_holder()); |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 LoadICState state = LoadICState(kNoExtraICState); | 607 LoadICState state = LoadICState(kNoExtraICState); |
607 cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode(); | 608 cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode(); |
608 } | 609 } |
609 } | 610 } |
610 | 611 |
611 handlers->Add(cached_stub); | 612 handlers->Add(cached_stub); |
612 } | 613 } |
613 } | 614 } |
614 } // namespace internal | 615 } // namespace internal |
615 } // namespace v8 | 616 } // namespace v8 |
OLD | NEW |