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

Unified Diff: src/compiler/js-global-specialization.h

Issue 1396333010: [turbofan] Initial support for monomorphic/polymorphic property loads. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix broken tests. Add documentation and TODOs. Created 5 years, 2 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
Index: src/compiler/js-global-specialization.h
diff --git a/src/compiler/js-global-specialization.h b/src/compiler/js-global-specialization.h
index 8454bd0e6b6def8c71e1ba0855dc431c7cb586be..f60f0956742570e6bac3b9d2308cfc7bb3c9d996 100644
--- a/src/compiler/js-global-specialization.h
+++ b/src/compiler/js-global-specialization.h
@@ -22,6 +22,7 @@ namespace compiler {
class CommonOperatorBuilder;
class JSGraph;
class JSOperatorBuilder;
+class MachineOperatorBuilder;
// Specializes a given JSGraph to a given GlobalObject, potentially constant
@@ -38,13 +39,14 @@ class JSGlobalSpecialization final : public AdvancedReducer {
JSGlobalSpecialization(Editor* editor, JSGraph* jsgraph, Flags flags,
Handle<GlobalObject> global_object,
- CompilationDependencies* dependencies);
+ CompilationDependencies* dependencies, Zone* zone);
Reduction Reduce(Node* node) final;
private:
Reduction ReduceJSLoadGlobal(Node* node);
Reduction ReduceJSStoreGlobal(Node* node);
+ Reduction ReduceJSLoadNamed(Node* node);
Reduction Replace(Node* node, Node* value, Node* effect = nullptr,
Node* control = nullptr) {
@@ -53,6 +55,12 @@ class JSGlobalSpecialization final : public AdvancedReducer {
}
Reduction Replace(Node* node, Handle<Object> value);
+ class PropertyAccessInfo;
+ bool ComputePropertyAccessInfo(Handle<Map> map, Handle<Name> name,
+ PropertyAccessInfo* info);
+ bool ComputePropertyAccessInfos(MapHandleList const& maps, Handle<Name> name,
+ ZoneVector<PropertyAccessInfo>* infos);
+
struct ScriptContextTableLookupResult;
bool LookupInScriptContextTable(Handle<Name> name,
ScriptContextTableLookupResult* result);
@@ -62,16 +70,19 @@ class JSGlobalSpecialization final : public AdvancedReducer {
Isolate* isolate() const;
CommonOperatorBuilder* common() const;
JSOperatorBuilder* javascript() const;
+ MachineOperatorBuilder* machine() const;
SimplifiedOperatorBuilder* simplified() { return &simplified_; }
Flags flags() const { return flags_; }
Handle<GlobalObject> global_object() const { return global_object_; }
CompilationDependencies* dependencies() const { return dependencies_; }
+ Zone* zone() const { return zone_; }
JSGraph* const jsgraph_;
Flags const flags_;
Handle<GlobalObject> global_object_;
CompilationDependencies* const dependencies_;
SimplifiedOperatorBuilder simplified_;
+ Zone* const zone_;
DISALLOW_COPY_AND_ASSIGN(JSGlobalSpecialization);
};

Powered by Google App Engine
This is Rietveld 408576698