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} if the maps | 83 // {receiver_type} up to (and including) the {holder}. |
84 // are stable, otherwise falls back to inserting runtime map checks | 84 void AssumePrototypesStable(Type* receiver_type, |
85 // on the prototypes. | 85 Handle<Context> native_context, |
86 Node* CheckPrototypeMaps(Type* receiver_type, Handle<Context> native_context, | 86 Handle<JSObject> holder); |
87 Handle<JSObject> holder, Node* effect, | |
88 Node* control); | |
89 | 87 |
90 // Extract receiver maps from {nexus} and filter based on {receiver} if | 88 // Extract receiver maps from {nexus} and filter based on {receiver} if |
91 // possible. | 89 // possible. |
92 bool ExtractReceiverMaps(Node* receiver, Node* effect, | 90 bool ExtractReceiverMaps(Node* receiver, Node* effect, |
93 FeedbackNexus const& nexus, | 91 FeedbackNexus const& nexus, |
94 MapHandleList* receiver_maps); | 92 MapHandleList* receiver_maps); |
95 | 93 |
96 // Try to infer a map for the given {receiver} at the current {effect}. | 94 // Try to infer a map for the given {receiver} at the current {effect}. |
97 // If a map is returned then you can be sure that the {receiver} definitely | 95 // If a map is returned then you can be sure that the {receiver} definitely |
98 // has the returned map at this point in the program (identified by {effect}). | 96 // has the returned map at this point in the program (identified by {effect}). |
(...skipping 28 matching lines...) Expand all Loading... |
127 DISALLOW_COPY_AND_ASSIGN(JSNativeContextSpecialization); | 125 DISALLOW_COPY_AND_ASSIGN(JSNativeContextSpecialization); |
128 }; | 126 }; |
129 | 127 |
130 DEFINE_OPERATORS_FOR_FLAGS(JSNativeContextSpecialization::Flags) | 128 DEFINE_OPERATORS_FOR_FLAGS(JSNativeContextSpecialization::Flags) |
131 | 129 |
132 } // namespace compiler | 130 } // namespace compiler |
133 } // namespace internal | 131 } // namespace internal |
134 } // namespace v8 | 132 } // namespace v8 |
135 | 133 |
136 #endif // V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ | 134 #endif // V8_COMPILER_JS_NATIVE_CONTEXT_SPECIALIZATION_H_ |
OLD | NEW |