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

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

Issue 2664853002: [turbofan] Support fast access to the current global object. (Closed)
Patch Set: Address comments. Created 3 years, 11 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 | « src/compiler/js-global-object-specialization.cc ('k') | 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 436949596ca2dfc66bc7113f906adfcd72aae57b..7c8158fd954fdfa87629271280dab598bc45cca3 100644
--- a/src/compiler/js-native-context-specialization.h
+++ b/src/compiler/js-native-context-specialization.h
@@ -57,6 +57,8 @@ class JSNativeContextSpecialization final : public AdvancedReducer {
Reduction ReduceJSInstanceOf(Node* node);
Reduction ReduceJSOrdinaryHasInstance(Node* node);
Reduction ReduceJSLoadContext(Node* node);
+ Reduction ReduceJSLoadGlobal(Node* node);
+ Reduction ReduceJSStoreGlobal(Node* node);
Reduction ReduceJSLoadNamed(Node* node);
Reduction ReduceJSStoreNamed(Node* node);
Reduction ReduceJSLoadProperty(Node* node);
@@ -84,6 +86,8 @@ class JSNativeContextSpecialization final : public AdvancedReducer {
LanguageMode language_mode,
Handle<TypeFeedbackVector> vector,
FeedbackVectorSlot slot, Node* index = nullptr);
+ Reduction ReduceGlobalAccess(Node* node, Node* receiver, Node* value,
+ Handle<Name> name, AccessMode access_mode);
Reduction ReduceSoftDeoptimize(Node* node, DeoptimizeReason reason);
@@ -156,6 +160,11 @@ class JSNativeContextSpecialization final : public AdvancedReducer {
Handle<SharedFunctionInfo> shared_info,
Handle<FunctionTemplateInfo> function_template_info);
+ // Script context lookup logic.
+ struct ScriptContextTableLookupResult;
+ bool LookupInScriptContextTable(Handle<Name> name,
+ ScriptContextTableLookupResult* result);
+
Graph* graph() const;
JSGraph* jsgraph() const { return jsgraph_; }
Isolate* isolate() const;
@@ -165,12 +174,16 @@ class JSNativeContextSpecialization final : public AdvancedReducer {
SimplifiedOperatorBuilder* simplified() const;
MachineOperatorBuilder* machine() const;
Flags flags() const { return flags_; }
+ Handle<JSGlobalObject> global_object() const { return global_object_; }
+ Handle<JSGlobalProxy> global_proxy() const { return global_proxy_; }
Handle<Context> native_context() const { return native_context_; }
CompilationDependencies* dependencies() const { return dependencies_; }
Zone* zone() const { return zone_; }
JSGraph* const jsgraph_;
Flags const flags_;
+ Handle<JSGlobalObject> global_object_;
+ Handle<JSGlobalProxy> global_proxy_;
Handle<Context> native_context_;
CompilationDependencies* const dependencies_;
Zone* const zone_;
« no previous file with comments | « src/compiler/js-global-object-specialization.cc ('k') | src/compiler/js-native-context-specialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698