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/ic/call-optimization.h" | 7 #include "src/ic/call-optimization.h" |
8 #include "src/ic/ic.h" | 8 #include "src/ic/ic.h" |
9 #include "src/ic/ic-inl.h" | 9 #include "src/ic/ic-inl.h" |
10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 Handle<Map> current_map = stub_holder_map; | 51 Handle<Map> current_map = stub_holder_map; |
52 Handle<JSObject> last(JSObject::cast(receiver_map->prototype())); | 52 Handle<JSObject> last(JSObject::cast(receiver_map->prototype())); |
53 while (true) { | 53 while (true) { |
54 if (current_map->is_dictionary_map()) cache_name = name; | 54 if (current_map->is_dictionary_map()) cache_name = name; |
55 if (current_map->prototype()->IsNull()) break; | 55 if (current_map->prototype()->IsNull()) break; |
56 if (name->IsPrivate()) { | 56 if (name->IsPrivate()) { |
57 // TODO(verwaest): Use nonexistent_private_symbol. | 57 // TODO(verwaest): Use nonexistent_private_symbol. |
58 cache_name = name; | 58 cache_name = name; |
59 JSReceiver* prototype = JSReceiver::cast(current_map->prototype()); | 59 JSReceiver* prototype = JSReceiver::cast(current_map->prototype()); |
60 if (!prototype->map()->is_hidden_prototype() && | 60 if (!prototype->map()->is_hidden_prototype() && |
61 !prototype->map()->IsGlobalObjectMap()) { | 61 !prototype->map()->IsJSGlobalObjectMap()) { |
62 break; | 62 break; |
63 } | 63 } |
64 } | 64 } |
65 | 65 |
66 last = handle(JSObject::cast(current_map->prototype())); | 66 last = handle(JSObject::cast(current_map->prototype())); |
67 current_map = handle(last->map()); | 67 current_map = handle(last->map()); |
68 } | 68 } |
69 // Compile the stub that is either shared for all names or | 69 // Compile the stub that is either shared for all names or |
70 // name specific if there are global objects involved. | 70 // name specific if there are global objects involved. |
71 Handle<Code> handler = PropertyHandlerCompiler::Find( | 71 Handle<Code> handler = PropertyHandlerCompiler::Find( |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 : kNoExtraICState); | 602 : kNoExtraICState); |
603 cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode(); | 603 cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode(); |
604 } | 604 } |
605 } | 605 } |
606 | 606 |
607 handlers->Add(cached_stub); | 607 handlers->Add(cached_stub); |
608 } | 608 } |
609 } | 609 } |
610 } // namespace internal | 610 } // namespace internal |
611 } // namespace v8 | 611 } // namespace v8 |
OLD | NEW |