Index: src/compiler/js-native-context-specialization.h |
diff --git a/src/compiler/js-native-context-specialization.h b/src/compiler/js-native-context-specialization.h |
index fab9d872905d5aa31c71994788a788dcaa86e6eb..24e10bb4b01390c646e76b6d653faa2bd9e722e8 100644 |
--- a/src/compiler/js-native-context-specialization.h |
+++ b/src/compiler/js-native-context-specialization.h |
@@ -56,6 +56,7 @@ class JSNativeContextSpecialization final : public AdvancedReducer { |
Reduction ReduceJSAdd(Node* node); |
Reduction ReduceJSGetSuperConstructor(Node* node); |
Reduction ReduceJSInstanceOf(Node* node); |
+ Reduction ReduceJSHasInPrototypeChain(Node* node); |
Reduction ReduceJSOrdinaryHasInstance(Node* node); |
Reduction ReduceJSLoadContext(Node* node); |
Reduction ReduceJSLoadGlobal(Node* node); |
@@ -179,6 +180,17 @@ class JSNativeContextSpecialization final : public AdvancedReducer { |
// program location. |
MaybeHandle<Map> InferReceiverRootMap(Node* receiver); |
+ // Checks if we know at compile time that the {receiver} either definitely |
+ // has the {prototype} in it's prototype chain, or the {receiver} definitely |
+ // doesn't have the {prototype} in it's prototype chain. |
+ enum InferHasInPrototypeChainResult { |
+ kIsInPrototypeChain, |
+ kIsNotInPrototypeChain, |
+ kMayBeInPrototypeChain |
+ }; |
+ InferHasInPrototypeChainResult InferHasInPrototypeChain( |
+ Node* receiver, Node* effect, Handle<HeapObject> prototype); |
+ |
// Script context lookup logic. |
struct ScriptContextTableLookupResult; |
bool LookupInScriptContextTable(Handle<Name> name, |