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

Unified Diff: src/compiler/js-create-lowering.h

Issue 1698783002: [turbofan] Lower object and array literals in JSCreateLowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Work-around for hole NaN on x86. Created 4 years, 10 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-create-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-create-lowering.h
diff --git a/src/compiler/js-create-lowering.h b/src/compiler/js-create-lowering.h
index 743c060b883078319e98798415f04e514b5fc4e0..d9d184b8e2981a598fcb1cf6ecccb144262358eb 100644
--- a/src/compiler/js-create-lowering.h
+++ b/src/compiler/js-create-lowering.h
@@ -11,6 +11,7 @@ namespace v8 {
namespace internal {
// Forward declarations.
+class AllocationSiteUsageContext;
class CompilationDependencies;
class Factory;
@@ -29,10 +30,13 @@ class SimplifiedOperatorBuilder;
class JSCreateLowering final : public AdvancedReducer {
public:
JSCreateLowering(Editor* editor, CompilationDependencies* dependencies,
- JSGraph* jsgraph)
+ JSGraph* jsgraph, MaybeHandle<LiteralsArray> literals_array,
+ Zone* zone)
: AdvancedReducer(editor),
dependencies_(dependencies),
- jsgraph_(jsgraph) {}
+ jsgraph_(jsgraph),
+ literals_array_(literals_array),
+ zone_(zone) {}
~JSCreateLowering() final {}
Reduction Reduce(Node* node) final;
@@ -42,6 +46,7 @@ class JSCreateLowering final : public AdvancedReducer {
Reduction ReduceJSCreateArguments(Node* node);
Reduction ReduceJSCreateArray(Node* node);
Reduction ReduceJSCreateIterResultObject(Node* node);
+ Reduction ReduceJSCreateLiteral(Node* node);
Reduction ReduceJSCreateFunctionContext(Node* node);
Reduction ReduceJSCreateWithContext(Node* node);
Reduction ReduceJSCreateCatchContext(Node* node);
@@ -58,6 +63,17 @@ class JSCreateLowering final : public AdvancedReducer {
Node* AllocateElements(Node* effect, Node* control,
ElementsKind elements_kind, int capacity,
PretenureFlag pretenure);
+ Node* AllocateFastLiteral(Node* effect, Node* control,
+ Handle<JSObject> boilerplate,
+ AllocationSiteUsageContext* site_context);
+ Node* AllocateFastLiteralElements(Node* effect, Node* control,
+ Handle<JSObject> boilerplate,
+ PretenureFlag pretenure,
+ AllocationSiteUsageContext* site_context);
+ Node* AllocateMutableHeapNumber(double value, Node* effect, Node* control);
+
+ // Infers the LiteralsArray to use for a given {node}.
+ MaybeHandle<LiteralsArray> GetSpecializationLiterals(Node* node);
Factory* factory() const;
Graph* graph() const;
@@ -68,9 +84,12 @@ class JSCreateLowering final : public AdvancedReducer {
SimplifiedOperatorBuilder* simplified() const;
MachineOperatorBuilder* machine() const;
CompilationDependencies* dependencies() const { return dependencies_; }
+ Zone* zone() const { return zone_; }
CompilationDependencies* const dependencies_;
JSGraph* const jsgraph_;
+ MaybeHandle<LiteralsArray> const literals_array_;
+ Zone* const zone_;
};
} // namespace compiler
« no previous file with comments | « no previous file | src/compiler/js-create-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698