Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: src/compiler/js-native-context-specialization.h

Issue 2943293002: [turbofan] Do constant-folding of JSHasInPrototypeChain early. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/js-native-context-specialization.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « no previous file | src/compiler/js-native-context-specialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698