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

Side by Side Diff: src/compiler/js-create-lowering.h

Issue 1678833002: [turbofan] Introduce JSCreateLowering for optimizing JSCreate nodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix length_type check. 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef V8_COMPILER_JS_CREATE_LOWERING_H_
6 #define V8_COMPILER_JS_CREATE_LOWERING_H_
7
8 #include "src/compiler/graph-reducer.h"
9
10 namespace v8 {
11 namespace internal {
12
13 // Forward declarations.
14 class CompilationDependencies;
15 class Factory;
16
17
18 namespace compiler {
19
20 // Forward declarations.
21 class CommonOperatorBuilder;
22 class JSGraph;
23 class JSOperatorBuilder;
24 class MachineOperatorBuilder;
25 class SimplifiedOperatorBuilder;
26
27
28 // Lowers JSCreate-level operators to fast (inline) allocations.
29 class JSCreateLowering final : public AdvancedReducer {
30 public:
31 JSCreateLowering(Editor* editor, CompilationDependencies* dependencies,
32 JSGraph* jsgraph)
33 : AdvancedReducer(editor),
34 dependencies_(dependencies),
35 jsgraph_(jsgraph) {}
36 ~JSCreateLowering() final {}
37
38 Reduction Reduce(Node* node) final;
39
40 private:
41 Reduction ReduceJSCreate(Node* node);
42 Reduction ReduceJSCreateArguments(Node* node);
43 Reduction ReduceJSCreateArray(Node* node);
44 Reduction ReduceJSCreateIterResultObject(Node* node);
45 Reduction ReduceJSCreateFunctionContext(Node* node);
46 Reduction ReduceJSCreateWithContext(Node* node);
47 Reduction ReduceJSCreateCatchContext(Node* node);
48 Reduction ReduceJSCreateBlockContext(Node* node);
49 Reduction ReduceNewArray(Node* node, Node* length, int capacity,
50 Handle<AllocationSite> site);
51
52 Node* AllocateArguments(Node* effect, Node* control, Node* frame_state);
53 Node* AllocateRestArguments(Node* effect, Node* control, Node* frame_state,
54 int start_index);
55 Node* AllocateAliasedArguments(Node* effect, Node* control, Node* frame_state,
56 Node* context, Handle<SharedFunctionInfo>,
57 bool* has_aliased_arguments);
58 Node* AllocateElements(Node* effect, Node* control,
59 ElementsKind elements_kind, int capacity,
60 PretenureFlag pretenure);
61
62 Factory* factory() const;
63 Graph* graph() const;
64 JSGraph* jsgraph() const { return jsgraph_; }
65 Isolate* isolate() const;
66 JSOperatorBuilder* javascript() const;
67 CommonOperatorBuilder* common() const;
68 SimplifiedOperatorBuilder* simplified() const;
69 MachineOperatorBuilder* machine() const;
70 CompilationDependencies* dependencies() const { return dependencies_; }
71
72 CompilationDependencies* const dependencies_;
73 JSGraph* const jsgraph_;
74 };
75
76 } // namespace compiler
77 } // namespace internal
78 } // namespace v8
79
80 #endif // V8_COMPILER_JS_CREATE_LOWERING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698