OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ | 5 #ifndef V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ |
6 #define V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ | 6 #define V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ |
7 | 7 |
8 #include "src/base/flags.h" | 8 #include "src/base/flags.h" |
9 #include "src/compiler/graph-reducer.h" | 9 #include "src/compiler/graph-reducer.h" |
10 | 10 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 LanguageMode language_mode); | 73 LanguageMode language_mode); |
74 Reduction ReduceNamedAccess(Node* node, Node* value, | 74 Reduction ReduceNamedAccess(Node* node, Node* value, |
75 MapHandleList const& receiver_maps, | 75 MapHandleList const& receiver_maps, |
76 Handle<Name> name, AccessMode access_mode, | 76 Handle<Name> name, AccessMode access_mode, |
77 LanguageMode language_mode, | 77 LanguageMode language_mode, |
78 Node* index = nullptr); | 78 Node* index = nullptr); |
79 | 79 |
80 Reduction ReduceSoftDeoptimize(Node* node); | 80 Reduction ReduceSoftDeoptimize(Node* node); |
81 | 81 |
82 // Adds stability dependencies on all prototypes of every class in | 82 // Adds stability dependencies on all prototypes of every class in |
83 // {receiver_type} up to (and including) the {holder}. | 83 // {receiver_type} up to (and including) the {holder} if the maps |
84 void AssumePrototypesStable(Type* receiver_type, | 84 // are stable, otherwise falls back to inserting runtime map checks |
85 Handle<Context> native_context, | 85 // on the prototypes. |
86 Handle<JSObject> holder); | 86 Node* CheckPrototypeMaps(Type* receiver_type, Handle<Context> native_context, |
| 87 Handle<JSObject> holder, Node* effect, |
| 88 Node* control); |
87 | 89 |
88 // Extract receiver maps from {nexus} and filter based on {receiver} if | 90 // Extract receiver maps from {nexus} and filter based on {receiver} if |
89 // possible. | 91 // possible. |
90 bool ExtractReceiverMaps(Node* receiver, Node* effect, | 92 bool ExtractReceiverMaps(Node* receiver, Node* effect, |
91 FeedbackNexus const& nexus, | 93 FeedbackNexus const& nexus, |
92 MapHandleList* receiver_maps); | 94 MapHandleList* receiver_maps); |
93 | 95 |
94 // Try to infer a map for the given {receiver} at the current {effect}. | 96 // Try to infer a map for the given {receiver} at the current {effect}. |
95 // If a map is returned then you can be sure that the {receiver} definitely | 97 // If a map is returned then you can be sure that the {receiver} definitely |
96 // has the returned map at this point in the program (identified by {effect}). | 98 // has the returned map at this point in the program (identified by {effect}). |
(...skipping 28 matching lines...) Expand all Loading... |
125 DISALLOW_COPY_AND_ASSIGN(JSNativeContextSpecialization); | 127 DISALLOW_COPY_AND_ASSIGN(JSNativeContextSpecialization); |
126 }; | 128 }; |
127 | 129 |
128 DEFINE_OPERATORS_FOR_FLAGS(JSNativeContextSpecialization::Flags) | 130 DEFINE_OPERATORS_FOR_FLAGS(JSNativeContextSpecialization::Flags) |
129 | 131 |
130 } // namespace compiler | 132 } // namespace compiler |
131 } // namespace internal | 133 } // namespace internal |
132 } // namespace v8 | 134 } // namespace v8 |
133 | 135 |
134 #endif // V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ | 136 #endif // V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ |
OLD | NEW |